:root {
    --primary-blue: #4285F4; /* Google Blue */
    --primary-green: #34A853; /* Google Green */
    --dark-blue: #1A73E8;   /* Darker blue for hover/active */
    --dark-green: #1E8E3E;  /* Darker green for hover/active */
    --light-gray: #f8f9fa;  /* Very light gray for general backgrounds */
    --medium-gray: #e0e0e0; /* Medium gray for borders and subtle elements */
    --text-dark: #212529;   /* Dark text for readability */
    --text-light: #ffffff;  /* Light text for dark backgrounds */
    --accent-color: #FBBC04; /* Google Yellow for subtle accents */
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); /* Subtle shadow */
}

/* Message Styles */
.success-message {
    color: var(--dark-green);
    background-color: #e6ffed; /* Light green background */
    border: 1px solid var(--primary-green);
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

.error-message {
    color: #721c24; /* Dark red text */
    background-color: #f8d7da; /* Light red background */
    border: 1px solid #f5c6cb; /* Red border */
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

/* General styles */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    background-color: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Footer */
footer {
    background-color: var(--dark-blue);
    color: var(--text-light);
    padding: 1rem 2rem;
    text-align: center;
    box-shadow: var(--box-shadow);
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

footer a {
    color: var(--text-light);
    text-decoration: underline;
}

footer a:hover {
    color: var(--accent-color);
}

footer h1 {
    margin: 0;
    font-size: 1.5rem;
    padding: 0;
}

/* Navigation */
nav {
    background-color: var(--primary-blue);
    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    box-shadow: var(--box-shadow);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin: 0 15px;
    position: relative;
    background-color: transparent;
}

nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0;
    border: none;
    outline: none;
    background-color: transparent;
}

nav a:hover,
nav a.active {
    color: var(--accent-color);
}

/* Dropdown styles */
.dropdown .dropbtn {
    cursor: pointer;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--text-light);
    min-width: 160px;
    box-shadow: var(--box-shadow);
    z-index: 1;
    left: 0;
    top: 100%;
    border: 1px solid var(--medium-gray);
}

.dropdown-content a {
    color: var(--text-dark);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    border-bottom: none;
    border: none;
    outline: none;
}

.dropdown-content a:hover {
    background-color: var(--light-gray);
    color: var(--primary-blue);
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Main content */
main {
    padding: 2rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background-color: var(--text-light);
    box-shadow: var(--box-shadow);
    border-radius: 8px;
    overflow: hidden;
}

table th, table td {
    padding: 1rem;
    border-bottom: 1px solid var(--medium-gray);
    text-align: left;
}

table th {
    background-color: var(--primary-blue);
    color: var(--text-light);
    font-weight: 600;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background-color: var(--light-gray);
}

/* Forms */
form {
    margin-top: 2rem;
    background-color: var(--text-light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form input[type="number"],
form textarea,
form select {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

form input:focus,
form textarea:focus,
form select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(66, 133, 244, 0.25); /* Blue focus shadow */
}

    form input[type="submit"],
    form input[type="button"],
    .add-brand-btn {
        background-color: var(--primary-green);
        color: var(--text-light);
        padding: 0.8rem 1.5rem;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 1rem;
        transition: background-color 0.3s ease;
        width: auto;
        display: inline-block;
        text-align: center;
        text-decoration: none;
    }
form input[type="submit"]:hover,
.add-brand-btn:hover {
    background-color: var(--dark-green);
}

.form-actions {
    display: flex;
    gap: 10px; /* Space between buttons */
    margin-top: 1rem; /* Space above the buttons */
    align-items: center; /* Vertically align buttons */
}

.filter-form .search-input {
    flex-grow: 1;
    vertical-align: middle;
    margin-bottom: 0; /* Override default form input margin */
    height: 2.5rem; /* Explicit height for alignment */
    box-sizing: border-box; /* Include padding and border in height */
}

.filter-form .search-button {
    flex-shrink: 0;
    padding: 0.8rem 1.5rem; /* Match other submit buttons */
    background-color: var(--primary-blue); /* Use primary blue for search button */
    color: var(--text-light);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    vertical-align: middle;
    margin-bottom: 0; /* Override default form input margin */
    height: 2.5rem; /* Explicit height for alignment */
    line-height: 0.9rem; /* Adjust line-height to vertically center text */
    box-sizing: border-box; /* Include padding and border in height */
}

.filter-form .search-button:hover {
    background-color: var(--dark-blue);
}

/* Filter Form Specific Styles */
.filter-form {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 2rem;
    background-color: var(--text-light);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    flex-wrap: wrap;
}

.filter-form label {
    margin-bottom: 0;
    white-space: nowrap;
}

.filter-form input[type="date"] {
    flex-grow: 1;
    max-width: 200px;
    margin-bottom: 0;
}

.filter-form input[type="submit"] {
    margin-bottom: 0;
    padding: 0.6rem 1.2rem;
    flex-shrink: 0;
    background-color: var(--primary-blue); /* Filter button blue */
}

.filter-form input[type="submit"]:hover {
    background-color: var(--dark-blue);
}

/* Brand Input Group in Add Phone Form */
.brand-input-group,
.model-input-group,
.color-input-group,
.memory-input-group,
.status-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.brand-input-group select,
.model-input-group select,
.color-input-group select,
.memory-input-group select,
.status-input-group select {
    flex-grow: 1;
    width: auto;
    margin-bottom: 0;
}

.model-input-group-bulk {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Space between model input groups */
    margin-bottom: 1rem;
}

.model-input-group-bulk > div {
    flex: 1 1 auto; /* Allow items to grow and shrink, but prefer their content size */
    min-width: 120px; /* Minimum width for each input group */
    background-color: var(--text-light); /* White background for the box */
    border: 1px solid var(--medium-gray); /* Border for the box */
    border-radius: 5px; /* Rounded corners for the box */
    padding: 8px; /* Padding inside the box */
}

.model-input-group-bulk label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.85rem; /* Smaller label font size */
}

.model-input-group-bulk input[type="text"] {
    width: 100%; /* Take full width of its parent div */
    padding: 0.5rem; /* Smaller padding */
    font-size: 0.9rem; /* Smaller font size */
    margin-bottom: 0; /* Remove default margin */
    box-sizing: border-box; /* Include padding in width */
}

.color-input-group-bulk {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Space between color input groups */
    margin-bottom: 1rem;
}

.color-input-group-bulk > div {
    flex: 1 1 auto; /* Allow items to grow and shrink, but prefer their content size */
    min-width: 120px; /* Minimum width for each input group */
    background-color: var(--text-light); /* White background for the box */
    border: 1px solid var(--medium-gray); /* Border for the box */
    border-radius: 5px; /* Rounded corners for the box */
    padding: 8px; /* Padding inside the box */
}

.color-input-group-bulk label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.85rem; /* Smaller label font size */
}

.color-input-group-bulk input[type="text"] {
    width: 100%; /* Take full width of its parent div */
    padding: 0.5rem; /* Smaller padding */
    font-size: 0.9rem; /* Smaller font size */
    margin-bottom: 0; /* Remove default margin */
    box-sizing: border-box; /* Include padding in width */
}

/* Styles for lists with delete buttons */
.attribute-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none; /* Remove default ul bullet points */
    padding: 0; /* Remove default ul padding */
    margin: 0; /* Remove default ul margin */
    gap: 8px; /* Space between boxes */
    background-color: var(--text-light); /* White background for the list container */
}

.attribute-list li {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 6px 8px; /* Slightly increased vertical padding */
    background-color: #f0fff0; /* More subtle light green background (Honeydew) */
    border: 1px solid var(--medium-gray);
    border-radius: 5px;
    /* margin-bottom removed, gap on parent handles spacing */
    gap: 10px; /* Space between text and button inside the box */
    flex-shrink: 0; /* Prevent items from shrinking too much */
    flex-grow: 0; /* Prevent items from growing too much */
}

.attribute-list li span {
    font-weight: 500; /* Make text bolder */
    line-height: 1; /* Ensure minimal line height for better vertical alignment */
}

.list-item-controls {
    display: flex;
    align-items: center;
    background: none; /* Remove any background */
    box-shadow: none; /* Remove any shadow */
    margin: 0; /* Remove default margins */
    padding: 0; /* Remove default paddings */
}
.list-item-controls input[type="submit"] {
    background-color: #dc3545; /* Red for delete - kept for standard delete action */
    color: var(--text-light);
    border: none;
    padding: 5px 10px; /* Increased padding */
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem; /* Increased font size */
    min-width: auto;
}

.list-item-controls input[type="submit"]:hover {
    background-color: #c82333;
}

/* New style for delete sale button */
.delete-sale-btn {
    background-color: #dc3545; /* Bootstrap danger red */
    color: var(--text-light);
    border: none;
    padding: 8px 15px; /* More padding */
    border-radius: 5px; /* Slightly more rounded */
    cursor: pointer;
    font-size: 0.95rem; /* Slightly larger font */
    font-weight: 500; /* Medium weight */
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth transition */
    display: inline-flex; /* Allow icon and text alignment */
    align-items: center;
    gap: 5px; /* Space between icon and text if an icon is added */
    text-decoration: none; /* Remove underline */
}

.delete-sale-btn:hover {
    background-color: #c82333; /* Darker red on hover */
    transform: translateY(-1px); /* Slight lift effect */
}

.delete-sale-btn:active {
    background-color: #bd2130; /* Even darker on active */
    transform: translateY(0);
}

/* Styles for the form containing the delete sale button */
.delete-sale-form {
    margin: 0;
    padding: 0;
    background-color: transparent; /* Remove white background */
    box-shadow: none; /* Remove shadow */
}

/* Responsive Design */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 1rem;
    }

    main {
        padding: 1rem;
    }

    form {
        padding: 1.5rem;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        width: 100%;
        border: none;
    }

    /* Responsive Table Styles */
    table {
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    table thead {
        display: none;
    }

    table tr {
        display: block;
        margin-bottom: 1.5rem;
        border-radius: 8px;
        box-shadow: var(--box-shadow);
        border: 1px solid var(--medium-gray);
        overflow: hidden;
    }

    table td {
        display: block;
        text-align: right;
        border-bottom: 1px dotted var(--medium-gray);
        position: relative;
        padding-left: 50%;
    }

    table td:last-child {
        border-bottom: 0;
    }

    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        font-weight: bold;
        text-align: left;
        white-space: nowrap;
    }

    table thead {
        display: none;
    }

    table tr {
        display: block;
        margin-bottom: 1.5rem;
        border-radius: 8px;
        box-shadow: var(--box-shadow);
        border: 1px solid var(--medium-gray);
        overflow: hidden;
    }

    table td {
        display: block;
        text-align: right;
        border-bottom: 1px dotted var(--medium-gray);
        position: relative;
        padding-left: 50%;
    }

    table td:last-child {
        border-bottom: 0;
    }

    table td::before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        font-weight: bold;
        text-align: left;
        white-space: nowrap;
    }
}

/* Login Page Specific Styles */
.login-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); /* Professional Deep Blue gradient */
    justify-content: center;
    align-items: center;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 3.5rem;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    text-align: center;
    transition: transform 0.3s ease;
}

.login-form:hover {
    transform: translateY(-5px);
}

.login-form h2 {
    margin-bottom: 2rem;
    color: #333;
    font-weight: 500;
    font-size: 1.5rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 500;
    color: #555;
    font-size: 0.9rem;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 2px solid #eee;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-size: 1rem;
    background-color: #f9f9f9;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #2a5298;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(42, 82, 152, 0.1);
}

.login-form input[type="submit"] {
    width: 100%;
    background: linear-gradient(to right, #1e3c72, #2a5298);
    color: var(--text-light);
    padding: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

.login-form input[type="submit"]:hover {
    background: linear-gradient(to right, #2a5298, #1e3c72);
    box-shadow: 0 6px 20px rgba(30, 60, 114, 0.4);
    transform: translateY(-2px);
}

.login-footer { margin-top: 20px; font-size: 0.85rem; color: #666; border-top: 1px solid #eee; padding-top: 15px; }
.login-footer a { color: var(--primary-blue); text-decoration: none; }
.login-footer a:hover { text-decoration: underline; }

/* Styling for Değişen Parça checkboxes */
.checkbox-group-inline {
    margin-bottom: 1rem;
}

.checkbox-group-inline span {
    display: inline-block;
    margin-right: 15px;
    vertical-align: middle;
}

.checkbox-group-inline input[type="checkbox"] {
    margin-right: 5px;
    width: auto;
    margin-bottom: 0;
}

.checkbox-group-inline span label {
    display: inline;
    margin-bottom: 0;
}

.box-invoice-options {
    display: flex;
    gap: 20px; /* Adjust as needed for spacing between the two groups */
    margin-bottom: 1rem;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

/* Sub-menu styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-content-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-submenu:hover .dropdown-content-submenu {
    display: block;
}

.dropdown-submenu .dropbtn-submenu {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    text-decoration: none;
    color: black;
}

.dropdown-submenu .dropbtn-submenu:hover {
    background-color: #f1f1f1;
}

/* Hamburger Menu Styles */
.nav-toggle {
    display: none; /* Hidden by default */
    cursor: pointer;
}

.nav-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: 0.4s;
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block; /* Show on smaller screens */
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    .nav-links {
        display: none; /* Hide the links by default */
        width: 100%;
        flex-direction: column;
        align-items: center;
    }

    .nav-links.active {
        display: flex; /* Show the links when active */
    }

    nav {
        flex-direction: column;
        align-items: flex-start;
    }
}