/* ============================================
   PRIMEGAURD ADMIN — GENERAL STYLESHEET
   Shared by: Login, Dashboard, Users, Posts,
             Services, Appointments, etc.
   ============================================ */

/* ============================================
   RESET
   ============================================ */
* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family:
        "Inter Tight",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
    background: #f1f3f0;
    color: #111827;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-section-gold {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #eef1ec 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.login-section-gold::before,
.login-section-gold::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.login-section-gold::before {
    width: 500px;
    height: 500px;
    background: radial-gradient(
        circle,
        rgba(26, 71, 42, 0.06) 0%,
        transparent 70%
    );
    top: -150px;
    left: -150px;
}

.login-section-gold::after {
    width: 600px;
    height: 600px;
    background: radial-gradient(
        circle,
        rgba(212, 175, 55, 0.07) 0%,
        transparent 70%
    );
    bottom: -200px;
    right: -200px;
}

.login-wrapper-gold {
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 2;
}

.login-card-gold {
    background: #ffffff;
    border-radius: 16px;
    padding: 50px 45px;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.login-card-header-gold {
    text-align: center;
    margin-bottom: 35px;
}

.login-logo-gold {
    margin-bottom: 22px;
}

.login-logo-gold img {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

.login-title-gold {
    font-size: 28px;
    font-weight: 700;
    color: #1a472a;
    margin: 0 0 8px;
    line-height: 1.3;
}

.login-subtitle-gold {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
}

.login-alert-gold {
    padding: 13px 18px;
    border-radius: 8px;
    margin-bottom: 22px;
    font-size: 14px;
    line-height: 1.5;
}

.login-alert-gold ul {
    margin: 0;
    padding-left: 18px;
}

.login-alert-success {
    background: #d1fae5;
    color: #065f46;
}

.login-alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.login-form-group {
    margin-bottom: 22px;
}

.login-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a472a;
    margin-bottom: 8px;
}

.login-label span {
    color: #c0392b;
}

.login-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    color: #111827;
    background: #fff;
    transition: all 0.25s ease;
    outline: none;
    font-family: inherit;
}

.login-input:focus {
    border-color: #1a472a;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.12);
}

.login-input::placeholder {
    color: #9ca3af;
}

.login-error-text {
    color: #c0392b;
    font-size: 13px;
    margin: 6px 0 0;
}

.login-options-gold {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 10px;
}

.login-remember-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
    margin: 0;
}

.login-remember-label input {
    width: 16px;
    height: 16px;
    accent-color: #1a472a;
    cursor: pointer;
}

.login-forgot-link {
    font-size: 14px;
    font-weight: 600;
    color: #1a472a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.login-forgot-link:hover {
    color: #d4af37;
}

.login-submit-btn {
    width: 100%;
    padding: 15px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #1a472a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
}

.login-submit-btn:hover {
    background: #d4af37;
    color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.25);
}

.login-back-home-gold {
    text-align: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.login-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    transition: color 0.2s ease;
}

.login-back-link:hover {
    color: #1a472a;
}

/* ============================================
   ADMIN PANEL — Shell + Sidebar + Topbar
   ============================================ */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: #1a472a;
    color: #fff;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.admin-nav {
    padding: 18px 0;
    flex: 1;
}

.admin-nav-title {
    padding: 14px 22px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.4);
}

.admin-nav-title:first-child {
    padding-top: 8px;
    color: #d4af37;
    font-size: 12px;
    letter-spacing: 1px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 22px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-left-color: #d4af37;
}

.admin-nav-item.active {
    background: rgba(212, 175, 55, 0.12);
    color: #d4af37;
    border-left-color: #d4af37;
}

.admin-nav-item i {
    width: 20px;
    font-size: 15px;
    text-align: center;
}

.admin-nav-item .nav-badge {
    margin-left: auto;
    background: #d4af37;
    color: #1a472a;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
}

.admin-sidebar-footer {
    padding: 16px 22px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

/* Main */
.admin-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Topbar */
.admin-topbar {
    background: #fff;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
    gap: 16px;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.admin-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #1a472a;
    cursor: pointer;
    padding: 6px;
}

.admin-page-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a472a;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.admin-logout-btn {
    background: #c0392b;
    color: #fff;
    border: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.admin-logout-btn:hover {
    background: #a93226;
    transform: translateY(-1px);
}

/* Content */
.admin-content {
    flex: 1;
    padding: 28px;
}

/* Mobile overlay */
.admin-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.admin-overlay.active {
    display: block;
}

/* ============================================
   GENERAL — Cards, Buttons, Forms, Tables
   Reusable across all admin pages
   ============================================ */

/* -------- Card / Panel -------- */
.adm-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px 26px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 22px;
}

.adm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.adm-card-header h2,
.adm-card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #1a472a;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.adm-card-header h2 i,
.adm-card-header h3 i {
    color: #d4af37;
}

/* -------- Welcome Card -------- */
.adm-welcome {
    background: #fff;
    border-radius: 12px;
    padding: 26px 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border-left: 4px solid #d4af37;
}

.adm-welcome h2 {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #1a472a;
}

.adm-welcome p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* -------- Buttons -------- */
.adm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    text-decoration: none;
    line-height: 1;
}

.adm-btn i {
    font-size: 14px;
}

.adm-btn-primary {
    background: #1a472a;
    color: #fff;
}

.adm-btn-primary:hover {
    background: #d4af37;
    color: #1a1a1a;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.25);
}

.adm-btn-gold {
    background: #d4af37;
    color: #1a1a1a;
}

.adm-btn-gold:hover {
    background: #c39e2c;
    transform: translateY(-1px);
}

.adm-btn-danger {
    background: #c0392b;
    color: #fff;
}

.adm-btn-danger:hover {
    background: #a93226;
    transform: translateY(-1px);
}

.adm-btn-light {
    background: #fff;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.adm-btn-light:hover {
    background: #f9fafb;
    color: #1a472a;
    border-color: #1a472a;
}

.adm-btn-sm {
    padding: 8px 14px;
    font-size: 13px;
}

/* -------- Forms -------- */
.adm-form-group {
    margin-bottom: 20px;
}

.adm-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a472a;
    margin-bottom: 8px;
}

.adm-label span {
    color: #c0392b;
}

.adm-input,
.adm-select,
.adm-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fff;
    transition: all 0.25s ease;
    outline: none;
    font-family: inherit;
}

.adm-input:focus,
.adm-select:focus,
.adm-textarea:focus {
    border-color: #1a472a;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.12);
}

.adm-input::placeholder,
.adm-textarea::placeholder {
    color: #9ca3af;
}

.adm-textarea {
    resize: vertical;
    min-height: 100px;
}

.adm-error-text {
    color: #c0392b;
    font-size: 13px;
    margin: 6px 0 0;
}

.adm-help-text {
    color: #6b7280;
    font-size: 12px;
    margin-top: 6px;
    display: block;
}

.adm-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid #f3f4f6;
    flex-wrap: wrap;
}

/* -------- Toolbar (page header actions) -------- */
.adm-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.adm-toolbar-left,
.adm-toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* -------- Alerts / Flash messages -------- */
.adm-alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
}

.adm-alert-success {
    background: #d1fae5;
    color: #065f46;
}

.adm-alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.adm-alert-warning {
    background: #fef3c7;
    color: #92400e;
}

.adm-alert-info {
    background: #dbeafe;
    color: #1e40af;
}

.adm-alert ul {
    margin: 0;
    padding-left: 18px;
}

/* -------- Badges -------- */
.adm-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1.5;
}

.adm-badge-success {
    background: #d1fae5;
    color: #065f46;
}

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

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

.adm-badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.adm-badge-gold {
    background: #d4af37;
    color: #1a1a1a;
}

.adm-badge-neutral {
    background: #f3f4f6;
    color: #4b5563;
}

/* -------- Empty State -------- */
.adm-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.adm-empty i {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 14px;
    display: block;
}

.adm-empty p {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
}

.adm-empty small {
    font-size: 13px;
    color: #9ca3af;
}

/* -------- Pagination -------- */
.adm-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

/* ============================================
   DATATABLE CUSTOMIZATION (global)
   ============================================ */
table.dataTable,
table.display {
    width: 100% !important;
    border-collapse: collapse !important;
    font-family: inherit;
}

table.dataTable thead th,
table.display thead th {
    text-align: left;
    padding: 14px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
    white-space: nowrap;
}

table.dataTable tbody td,
table.display tbody td {
    padding: 14px 12px;
    font-size: 14px;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

table.dataTable tbody tr:hover,
table.display tbody tr:hover {
    background: #f9fafb;
}

/* DataTables wrapper */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 16px;
    font-size: 14px;
    color: #4b5563;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    margin-left: 8px;
    outline: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #1a472a;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.08);
}

.dataTables_wrapper .dataTables_length select {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 14px;
    outline: none;
    margin: 0 6px;
    font-family: inherit;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 20px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    margin: 0 2px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #4b5563 !important;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f3f4f6;
    color: #1a472a !important;
    border-color: #1a472a;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #1a472a !important;
    color: #fff !important;
    border-color: #1a472a !important;
}

.dataTables_wrapper .dataTables_info {
    margin-top: 20px;
    font-size: 13px;
    color: #6b7280;
}

.dataTables_wrapper .dataTables_processing {
    background: rgba(26, 71, 42, 0.06);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    color: #1a472a;
}

/* Export buttons */
.dt-buttons {
    margin-bottom: 16px;
}

.dt-buttons .dt-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    margin-right: 6px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.dt-buttons .dt-button:hover {
    background: #1a472a;
    color: #fff;
    border-color: #1a472a;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-menu-toggle {
        display: block;
    }

    .admin-content {
        padding: 20px 16px;
    }

    .admin-topbar {
        padding: 14px 18px;
    }
}

@media (max-width: 767px) {
    .login-card-gold {
        padding: 35px 25px;
        border-radius: 14px;
    }

    .login-title-gold {
        font-size: 24px;
    }

    .login-options-gold {
        flex-direction: column;
        align-items: flex-start;
    }

    .login-section-gold::before,
    .login-section-gold::after {
        display: none;
    }

    .adm-card {
        padding: 20px 18px;
    }

    .adm-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .adm-toolbar-left,
    .adm-toolbar-right {
        width: 100%;
    }

    .adm-form-actions {
        flex-direction: column-reverse;
    }

    .adm-form-actions .adm-btn {
        width: 100%;
    }
}

/* ============================================
   DATATABLE ACTION BUTTONS
   Edit (green) + Delete (red) — compact
   ============================================ */
.action-buttons {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* ---- Base button ---- */
.action-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.15s ease,
        box-shadow 0.25s ease;
}

.action-btn i {
    font-size: 12px;
    line-height: 1;
    transition: color 0.25s ease;
}

/* ---- Edit button (green) ---- */
.edit-user {
    background: rgba(26, 71, 42, 0.1);
    border-color: rgba(26, 71, 42, 0.25);
    color: #1a472a;
}

.edit-user:hover {
    background: #1a472a;
    border-color: #1a472a;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(26, 71, 42, 0.3);
}

.edit-user:hover i {
    color: #ffffff;
}

/* ---- Delete button (red) ---- */
.delete-user {
    background: rgba(192, 57, 43, 0.1);
    border-color: rgba(192, 57, 43, 0.25);
    color: #c0392b;
}

.delete-user:hover {
    background: #c0392b;
    border-color: #c0392b;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(192, 57, 43, 0.3);
}

.delete-user:hover i {
    color: #ffffff;
}

/* ---- Active (click) state ---- */
.action-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ---- Focus ring (keyboard) ---- */
.action-btn:focus-visible {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

/* ---- Custom tooltip ---- */
.action-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #1a1a1a;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 5px 8px;
    border-radius: 5px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
    z-index: 20;
}

/* Tooltip arrow */
.action-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: #1a1a1a;
}

.action-btn:hover .action-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Responsive tweaks ---- */
@media (max-width: 767px) {
    .action-btn {
        width: 28px;
        height: 28px;
    }

    .action-btn i {
        font-size: 11px;
    }
}
