/* ============================================================
   AWP-CMS — Main Stylesheet
   Color palette:
     #009639 (primary green)
     #ffd700 (gold / accent)
     #1e6031 (dark green — header / footer)
     #e0a70d (dark gold)
   Font: Libre Franklin
   ============================================================ */

/* ── Font-Face (Libre Franklin) ──────────────────────────── */
@font-face {
    font-family: 'Libre Franklin';
    src: url('../fonts/LibreFranklin-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Libre Franklin';
    src: url('../fonts/LibreFranklin-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* ── Reset / Base ────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    overflow-y: auto;
}

body {
    font-family: 'Libre Franklin', -apple-system, BlinkMacSystemFont,
                 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #009639;
    text-decoration: none;
    transition: color .2s ease;
}
a:hover {
    color: #00c94a;
}
a:focus-visible {
    outline: 2px solid #009639;
    outline-offset: 2px;
}

/* ── Navbar (dark green) ─────────────────────────────────── */
.awp-navbar {
    background-color: #1e6031;
    min-height: 64px;
}
.awp-navbar .navbar-brand {
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.5px;
}
.awp-navbar .navbar-brand img {
    filter: brightness(0) invert(1);
}
.awp-navbar .nav-link {
    color: rgba(255,255,255,.85);
    font-weight: 500;
    padding: .5rem 1rem;
    border-radius: .375rem;
    transition: background-color .2s, color .2s;
}
.awp-navbar .nav-link:hover,
.awp-navbar .nav-link:focus {
    color: #fff;
    background-color: rgba(255,255,255,.12);
}
.awp-navbar .dropdown-menu {
    border: none;
    border-radius: .5rem;
    padding: .5rem 0;
}
.awp-navbar .dropdown-item {
    padding: .5rem 1.25rem;
    font-weight: 500;
}
.awp-navbar .dropdown-item:hover {
    background-color: #e8f5e9;
    color: #009639;
}

/* Avatar circle */
.avatar-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #ffd700;
    color: #1e6031;
    font-weight: 700;
    font-size: .875rem;
}

/* Avatar circle (profile page) */
.avatar-circle-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #009639 0%, #1e6031 100%);
    color: #ffd700;
    font-weight: 700;
    font-size: 2rem;
    border: 4px solid #ffd700;
}

/* ── Auth Pages (login, register, forgot) ────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0,0,0,.10), 0 4px 20px rgba(0,0,0,.06);
    overflow: hidden;
}
.auth-card.auth-card-lg {
    max-width: 520px;
}

.auth-card .auth-header {
    background-color: #1e6031;
    padding: 2rem 2rem 1.5rem;
    text-align: center;
}

.auth-card .auth-header img {
    height: 56px;
    margin-bottom: .75rem;
    filter: brightness(0) invert(1);
}

.auth-card .auth-header h4 {
    color: #fff;
    font-weight: 700;
    margin: 0;
    letter-spacing: .5px;
}

.auth-card .auth-body {
    padding: 2rem 2rem 2.5rem;
}

.auth-card .auth-body .form-label {
    font-weight: 600;
    font-size: .875rem;
    color: #555;
    margin-bottom: .25rem;
}

.auth-card .auth-body .form-control,
.auth-card .auth-body .form-select {
    border-radius: .5rem;
    border: 1.5px solid #dee2e6;
    padding: .6rem 1rem;
    font-size: .9375rem;
    transition: border-color .2s, box-shadow .2s;
}
.auth-card .auth-body .form-control:focus,
.auth-card .auth-body .form-select:focus {
    border-color: #009639;
    box-shadow: 0 0 0 3px rgba(0,150,57,.15);
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn-awp-primary {
    background-color: #009639;
    border-color: #009639;
    color: #fff;
    font-weight: 600;
    padding: .6rem 1.5rem;
    border-radius: .5rem;
    transition: background-color .2s, transform .1s;
}
.btn-awp-primary:hover {
    background-color: #007a2e;
    border-color: #007a2e;
    color: #fff;
    transform: translateY(-1px);
}
.btn-awp-primary:active {
    transform: translateY(0);
}

.btn-awp-gold {
    background-color: #ffd700;
    border-color: #ffd700;
    color: #1e6031;
    font-weight: 600;
    padding: .6rem 1.5rem;
    border-radius: .5rem;
    transition: background-color .2s, transform .1s;
}
.btn-awp-gold:hover {
    background-color: #e0a70d;
    border-color: #e0a70d;
    color: #1e6031;
    transform: translateY(-1px);
}

/* ── Footer ──────────────────────────────────────────────── */
.awp-footer {
    background-color: #1e6031;
    color: rgba(255,255,255,.85);
    padding: 1.25rem 0;
    margin-top: auto;
    font-size: .875rem;
}
.awp-footer a {
    color: #ffd700;
}
.awp-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* ── Dashboard Cards ─────────────────────────────────────── */
.dashboard-card {
    border: none;
    border-radius: .75rem;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: box-shadow .2s, transform .2s;
}
.dashboard-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,.10);
    transform: translateY(-2px);
}
.dashboard-card .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

/* ── Tables ──────────────────────────────────────────────── */
.table-awp {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.table-awp thead th {
    background-color: #1e6031;
    color: #fff;
    font-weight: 600;
    font-size: .8125rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: .75rem 1rem;
    border: none;
}
.table-awp tbody td {
    padding: .75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}
.table-awp tbody tr:hover {
    background-color: #f0fdf4;
}

/* ── OTP Timer ───────────────────────────────────────────── */
.otp-timer {
    font-size: 1.5rem;
    font-weight: 700;
    color: #009639;
    font-variant-numeric: tabular-nums;
}
.otp-timer.warning {
    color: #dc3545;
    animation: pulse 1s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .5; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 576px) {
    .auth-card .auth-header,
    .auth-card .auth-body {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* ── DataTables overrides ────────────────────────────────── */
.dataTables_wrapper .dataTables_filter input {
    border-radius: .5rem;
    border: 1.5px solid #dee2e6;
    padding: .35rem .75rem;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #009639 !important;
    border-color: #009639 !important;
    color: #fff !important;
    border-radius: .375rem;
}

/* ── Dashboard stat card icon colours ──────────────────── */
.bg-stat-activated   { background-color: #28a745; }
.bg-stat-pending     { background-color: #ffc107; }
.bg-stat-deactivated { background-color: #dc3545; }

/* ── Profile avatar gold border ────────────────────────── */
.profile-border {
    border: 4px solid #ffd700;
}

/* ── Uniform action buttons ─────────────────────────────── */
.btn-action {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* ── Misc ────────────────────────────────────────────────── */
.text-awp-primary { color: #009639; }
.bg-awp-primary   { background-color: #009639; }
.bg-awp-dark      { background-color: #1e6031; }
.border-awp       { border-color: #009639; }

/* ── Floating Help Button ──────────────────────────────── */
.awp-help-float-btn {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 1050;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #ffd700;
    color: #1e6031;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    cursor: pointer;
    transition: background-color .2s, transform .2s, box-shadow .2s;
    border: none;
    padding: 0;
    line-height: 1;
}
.awp-help-float-btn:hover {
    background-color: #ffff00;
    color: #1e6031;
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(0,0,0,.25);
}
.awp-help-float-btn:active {
    transform: scale(0.95);
}

/* ── Tutorial Modal ───────────────────────────────────── */
.tutorial-sidebar {
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
}
.tutorial-sidebar .nav-link {
    color: #333;
    border-radius: .5rem;
    margin-bottom: .25rem;
    padding: .65rem .75rem;
    font-weight: 500;
    font-size: .9rem;
    transition: background-color .2s, color .2s;
}
.tutorial-sidebar .nav-link:hover {
    background-color: #e8f5e9;
    color: #009639;
}
.tutorial-sidebar .nav-link.active {
    background-color: #009639;
    color: #fff;
}
.tutorial-sidebar .nav-link .badge {
    font-size: .6rem;
    font-weight: 600;
    padding: .2rem .45rem;
}
.tutorial-content {
    min-height: 400px;
}
.tutorial-content h5 {
    color: #1e6031;
    font-weight: 700;
    margin-bottom: .5rem;
    font-size: 1.2rem;
}
.tutorial-content h6 {
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: .75rem;
    color: #009639;
    font-size: .95rem;
}
.tutorial-content .step-item {
    display: flex;
    gap: .75rem;
    margin-bottom: .5rem;
    padding: .65rem 1rem;
    background-color: #f8f9fa;
    border-radius: .5rem;
    border-left: 4px solid #009639;
    align-items: flex-start;
}
.tutorial-content .step-number {
    width: 26px;
    height: 26px;
    min-width: 26px;
    background-color: #009639;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    margin-top: 1px;
}
.tutorial-content .tip-box {
    background-color: #fff8e1;
    border-radius: .5rem;
    padding: .85rem 1.1rem;
    border-left: 4px solid #ffd700;
    margin: 1rem 0;
    font-size: .9rem;
}
.tutorial-content .tip-box i {
    color: #e0a70d;
}
.tutorial-content ul {
    padding-left: 1.25rem;
}
.tutorial-content ul li {
    margin-bottom: .35rem;
    line-height: 1.5;
}
.tutorial-content .card.border-awp {
    border: 2px solid #009639;
}
.tutorial-content .card.border-info {
    border: 2px solid #17a2b8;
}

/* ── Sub-navigation ───────────────────────────────────── */
.sub-nav {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: .5rem 0;
}
.sub-nav .nav-pills .nav-link {
    color: #555;
    font-weight: 500;
    padding: .4rem 1rem;
    border-radius: .375rem;
    transition: background-color .2s, color .2s;
}
.sub-nav .nav-pills .nav-link:hover {
    background-color: #e8f5e9;
    color: #009639;
}
.sub-nav .nav-pills .nav-link.active {
    background-color: #009639;
    color: #fff;
}

@media (max-width: 767px) {
    .tutorial-sidebar {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    .awp-help-float-btn {
        top: 72px;
        right: 16px;
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
}
