* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background-color: #f8fafc;
    color: #1f2937;
    font-family: Arial, sans-serif;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

.topbar {
    background-color: #1f2937;
    color: white;
    padding: 18px 0;
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.logo {
    margin: 0;
    font-size: 22px;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

nav a:hover {
    text-decoration: underline;
}

.hero {
    padding: 48px 0 25px;
}

.hero h2 {
    margin-bottom: 10px;
    font-size: 32px;
}

.hero p {
    color: #5b6470;
    font-size: 17px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.dashboard-card {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    border-left: 6px solid #2563eb;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

.warning-card {
    border-left-color: #d97706;
}

.danger-card {
    border-left-color: #dc2626;
}

.dashboard-card h3 {
    margin-top: 0;
    color: #4b5563;
    font-size: 16px;
}

.number {
    margin: 10px 0 0;
    font-size: 38px;
    font-weight: bold;
}

.actions {
    margin-top: 40px;
    padding-bottom: 50px;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.button {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 6px;
    background-color: #2563eb;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

.button:hover {
    background-color: #1d4ed8;
}

.primary-button {
    background-color: #2563eb;
}

.secondary-button {
    background-color: #4b5563;
}

.danger-button {
    background-color: #dc2626;
}

.button:hover {
    opacity: 0.88;
}

@media (max-width: 750px) {
    .topbar-content {
        flex-direction: column;
        align-items: flex-start;
    }

    nav {
        flex-wrap: wrap;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
.page-header {
    margin-bottom: 25px;
}

.page-header h1 {
    margin-bottom: 6px;
}

.page-header p {
    color: #666;
    margin: 0;
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    max-width: 900px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 7px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #333333;
}

.form-group textarea {
    resize: vertical;
}

.form-group small {
    color: #666666;
    margin-top: 6px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
}

.button-secondary {
    background-color: #777777;
}

.button-secondary:hover {
    background-color: #555555;
}

@media (max-width: 700px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-group-full {
        grid-column: auto;
    }
}
.page-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.table-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow-x: auto;
}

.sites-table {
    width: 100%;
    border-collapse: collapse;
}

.sites-table th,
.sites-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.sites-table th {
    background-color: #f8fafc;
    font-weight: 700;
    color: #374151;
}

.sites-table tbody tr:hover {
    background-color: #f9fafb;
}

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

.empty-state {
    background-color: white;
    padding: 50px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.empty-state h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666666;
    margin-bottom: 25px;
}

@media (max-width: 700px) {
    .page-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

.small-button {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.edit-button {
    background-color: #10ce30a8;
    color: white;
}

.edit-button:hover {
    background-color: #06d93ed5;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.delete-form {
    display: inline;
    margin: 0;
}

.delete-button {
    background-color: #dc2626;
    color: white;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.delete-button:hover {
    background-color: #b91c1c;
}
.due-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.summary-card {
    background-color: white;
    border-radius: 10px;
    padding: 22px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-label {
    font-size: 17px;
    font-weight: 700;
}

.summary-number {
    font-size: 30px;
    font-weight: 800;
}

.overdue-summary {
    border-left: 6px solid #dc2626;
}

.soon-summary {
    border-left: 6px solid #f59e0b;
}

.due-section {
    margin-bottom: 40px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.section-heading h2 {
    margin: 0;
}

.status-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.overdue-badge {
    background-color: #fee2e2;
    color: #991b1b;
}

.soon-badge {
    background-color: #fef3c7;
    color: #92400e;
}

.success-empty-state {
    border-left: 6px solid #16a34a;
}

@media (max-width: 700px) {
    .due-summary {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}
.flash-message {
    margin: 20px auto;
    padding: 15px 20px;
    border-radius: 8px;
    font-weight: bold;
    max-width: 1200px;
}

.flash-success {
    background: #dcfce7;
    color: #166534;
    border-left: 6px solid #16a34a;
}

/* Modern application header */

.topbar {
    background-color: #0f172a;
    border-bottom: 1px solid #1e293b;
    padding: 14px 0;
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background-color: #dc2626;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    color: white;
    font-size: 17px;
    font-weight: 800;
}

.brand-subtitle {
    color: #94a3b8;
    font-size: 12px;
    margin-top: 2px;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-navigation a {
    color: #cbd5e1;
    text-decoration: none;
    padding: 10px 13px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s;
}

.main-navigation a:hover {
    background-color: #1e293b;
    color: white;
}

.main-navigation .due-nav-link {
    background-color: #7f1d1d;
    color: white;
}

.main-navigation .due-nav-link:hover {
    background-color: #991b1b;
}


/* Dashboard header */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin: 38px 0 28px;
}

.dashboard-header h1 {
    margin: 3px 0 7px;
    font-size: 32px;
    color: #0f172a;
}

.page-label {
    margin: 0;
    color: #dc2626;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dashboard-description {
    margin: 0;
    color: #64748b;
}


/* Dashboard cards */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 38px;
}

.dashboard-card {
    background-color: white;
    border-radius: 14px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}

.total-card {
    border-top: 4px solid #2563eb;
}

.warning-card {
    border-top: 4px solid #f59e0b;
}

.danger-card {
    border-top: 4px solid #dc2626;
}

.card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 900;
}

.total-icon {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.warning-icon {
    background-color: #fef3c7;
    color: #b45309;
}

.danger-icon {
    background-color: #fee2e2;
    color: #b91c1c;
}

.card-status {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.card-label {
    color: #475569;
    font-weight: 700;
    margin: 0 0 4px;
}

.dashboard-card .number {
    font-size: 40px;
    line-height: 1;
    font-weight: 800;
    color: #0f172a;
    margin: 8px 0 12px;
}

.card-description {
    color: #64748b;
    font-size: 13px;
    margin: 0;
}


/* Quick actions */

.quick-actions {
    margin-bottom: 45px;
}

.section-title-row {
    margin-bottom: 18px;
}

.section-title-row h2 {
    margin: 4px 0 0;
    color: #0f172a;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.quick-action-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    text-decoration: none;
    transition: 0.2s;
}

.quick-action-card:hover {
    transform: translateY(-2px);
    border-color: #94a3b8;
    box-shadow: 0 7px 20px rgba(15, 23, 42, 0.08);
}

.quick-action-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background-color: #e0e7ff;
    color: #3730a3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 20px;
}

.quick-action-card h3 {
    margin: 1px 0 6px;
    color: #0f172a;
    font-size: 16px;
}

.quick-action-card p {
    margin: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}

.urgent-action .quick-action-icon {
    background-color: #fee2e2;
    color: #b91c1c;
}


/* Responsive design */

@media (max-width: 850px) {
    .topbar-content {
        align-items: flex-start;
        flex-direction: column;
    }

    .main-navigation {
        width: 100%;
        flex-wrap: wrap;
    }

    .dashboard-grid,
    .quick-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .dashboard-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-header .button {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .brand-subtitle {
        display: none;
    }
}

/* All Sites page */

.sites-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    margin: 38px 0 24px;
}

.sites-page-header h1 {
    margin: 3px 0 7px;
    font-size: 32px;
    color: #0f172a;
}


/* Search */

.search-form {
    display: flex;
    align-items: stretch;
    gap: 10px;
    padding: 18px;
    margin-bottom: 14px;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}

.search-input-wrapper {
    flex: 1;
}

.search-input-wrapper input {
    width: 100%;
    height: 44px;
    padding: 0 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
    color: #0f172a;
    font-size: 15px;
    box-sizing: border-box;
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: #2563eb;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-results-summary {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 14px;
}

.search-results-summary p {
    margin: 0;
}


/* Empty search results */

.empty-state {
    padding: 55px 25px;
    text-align: center;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.empty-state-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e2e8f0;
    color: #475569;
    font-size: 22px;
    font-weight: 800;
}

.empty-state h2 {
    margin: 0 0 8px;
    color: #0f172a;
}

.empty-state p {
    margin: 0 auto 20px;
    max-width: 500px;
    color: #64748b;
}


/* Search responsiveness */

@media (max-width: 700px) {
    .sites-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .sites-page-header .button {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .search-form {
        flex-direction: column;
    }

    .search-form .button {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}
.form-group select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: white;
    color: #0f172a;
    font-size: 15px;
}

.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.flash-error {
    background-color: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.bulk-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

.delete-all-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.sites-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

