/* ==========================================================================
   HEX SOFTWARES OFFICIAL BRAND DESIGN SYSTEM
   Brand Guideline Palette:
   - Primary Green:    #2E7D32 (Growth, Success, Fresh Ideas)
   - Secondary Green:  #4CAF50 (Energy, Progress, Positive)
   - Light Green:      #E8F5E9 (Freshness, Clean, Minimal)
   - Dark Navy:        #0B1F33 (Trust, Technology, Stability)
   - Primary Black:    #0B0F0D (Power, Professional, Focus)
   - White:            #FFFFFF (Clarity, Simplicity, Space)
   - Light Grey:       #F5F7F6 (Balance, Subtle, Background)
   ========================================================================== */

:root {
    --hex-green-primary: #2E7D32;
    --hex-green-secondary: #4CAF50;
    --hex-green-light: #E8F5E9;
    --hex-navy: #0B1F33;
    --hex-black: #0B0F0D;
    --hex-grey: #F5F7F6;
    --hex-white: #FFFFFF;
    
    --hex-primary: #2E7D32;
    --hex-secondary: #0B1F33;
    --hex-accent: #4CAF50;
}

body {
    font-family: 'Poppins', 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #0B0F0D;
    background-color: #F5F7F6;
    scroll-behavior: smooth;
}

/* ==========================================================================
   OFFICIAL BUTTON STYLES (Primary, Secondary, Outline, Gradient)
   ========================================================================== */

/* Primary Button: Solid Green (#2E7D32) with white text */
.btn-hex-primary,
.btn-primary-green {
    background-color: #2E7D32 !important;
    background: linear-gradient(135deg, #2E7D32 0%, #1e5622 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    font-weight: 700 !important;
    font-family: 'Poppins', sans-serif !important;
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.35) !important;
    transition: all 0.25s ease-in-out !important;
    cursor: pointer !important;
}
.btn-hex-primary:hover,
.btn-primary-green:hover {
    background: linear-gradient(135deg, #1e5622 0%, #0B1F33 100%) !important;
    color: #FFFFFF !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.45) !important;
}

/* Gradient Button: Green to Navy (#2E7D32 to #0B1F33) */
.btn-hex-gradient {
    background-color: #2E7D32 !important;
    background: linear-gradient(135deg, #2E7D32 0%, #0B1F33 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    font-weight: 800 !important;
    font-family: 'Poppins', sans-serif !important;
    box-shadow: 0 6px 20px rgba(11, 31, 51, 0.35) !important;
    transition: all 0.25s ease-in-out !important;
    cursor: pointer !important;
}
.btn-hex-gradient:hover {
    background: linear-gradient(135deg, #1b5e20 0%, #06101a 100%) !important;
    color: #FFFFFF !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 24px rgba(11, 31, 51, 0.5) !important;
}

/* Secondary Button: Dark Navy (#0B1F33) with white text */
.btn-hex-secondary,
.btn-secondary-navy {
    background-color: #0B1F33 !important;
    color: #FFFFFF !important;
    border: 1px solid #163252 !important;
    font-weight: 700 !important;
    font-family: 'Poppins', sans-serif !important;
    box-shadow: 0 4px 12px rgba(11, 31, 51, 0.25) !important;
    transition: all 0.25s ease-in-out !important;
    cursor: pointer !important;
}
.btn-hex-secondary:hover,
.btn-secondary-navy:hover {
    background-color: #0B0F0D !important;
    color: #FFFFFF !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(11, 31, 51, 0.35) !important;
}

/* Outline Button: White background with Green border (#2E7D32) and green text */
.btn-hex-outline,
.btn-outline-green {
    background-color: #FFFFFF !important;
    color: #2E7D32 !important;
    border: 2px solid #2E7D32 !important;
    font-weight: 700 !important;
    font-family: 'Poppins', sans-serif !important;
    transition: all 0.25s ease-in-out !important;
    cursor: pointer !important;
}
.btn-hex-outline:hover,
.btn-outline-green:hover {
    background-color: #E8F5E9 !important;
    color: #1e5622 !important;
    border-color: #1e5622 !important;
}

/* ==========================================================================
   OFFICIAL GRADIENT COMBINATIONS
   ========================================================================== */

/* Green to Navy (#2E7D32 to #0B1F33) */
.bg-gradient-green-navy,
.bg-hex-gradient {
    background: linear-gradient(135deg, #2E7D32 0%, #0B1F33 100%) !important;
}

/* Light Green to White (#E8F5E9 to #FFFFFF) */
.bg-gradient-lightgreen-white {
    background: linear-gradient(135deg, #E8F5E9 0%, #FFFFFF 100%) !important;
}

/* Navy to Black (#0B1F33 to #0B0F0D) */
.bg-gradient-navy-black {
    background: linear-gradient(135deg, #0B1F33 0%, #0B0F0D 100%) !important;
}

/* ==========================================================================
   COLOR UTILITY CLASSES
   ========================================================================== */
.bg-hex-green { background-color: #2E7D32 !important; }
.bg-hex-secondary-green { background-color: #4CAF50 !important; }
.bg-hex-light-green { background-color: #E8F5E9 !important; }
.bg-hex-navy { background-color: #0B1F33 !important; }
.bg-hex-black { background-color: #0B0F0D !important; }
.bg-hex-light-grey { background-color: #F5F7F6 !important; }

.text-hex-green { color: #2E7D32 !important; }
.text-hex-secondary-green { color: #4CAF50 !important; }
.text-hex-navy { color: #0B1F33 !important; }
.text-hex-black { color: #0B0F0D !important; }

.border-hex-green { border-color: #2E7D32 !important; }
.border-hex-navy { border-color: #0B1F33 !important; }
.border-hex-light-green { border-color: #E8F5E9 !important; }

/* Badges & Pills */
.badge-hex-pill {
    background-color: #E8F5E9 !important;
    color: #2E7D32 !important;
    border: 1px solid rgba(46, 125, 50, 0.3) !important;
    font-weight: 700 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
}

.badge-hex-navy {
    background-color: rgba(11, 31, 51, 0.1) !important;
    color: #0B1F33 !important;
    border: 1px solid rgba(11, 31, 51, 0.2) !important;
    font-weight: 700 !important;
}

/* Hexagon Shape Styling */
.hex-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f46e5, #06b6d4);
    color: white;
    font-weight: bold;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 24rem;
    width: 100%;
}
.toast-alert {
    animation: slideInRight 0.3s ease-out forwards;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Certificate Layout & Gold Border */
.certificate-container {
    position: relative;
    background: #fff;
    border: 16px solid #1e293b;
    outline: 4px solid #d97706;
    outline-offset: -10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 3rem 4rem;
    max-width: 900px;
    margin: 0 auto;
    font-family: 'Cinzel', 'Times New Roman', serif;
    background-image: radial-gradient(#f8fafc 15%, transparent 16%), radial-gradient(#f1f5f9 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
}
.certificate-corner {
    position: absolute;
    width: 45px;
    height: 45px;
    border: 3px solid #d97706;
}
.certificate-corner-tl { top: 12px; left: 12px; border-right: none; border-bottom: none; }
.certificate-corner-tr { top: 12px; right: 12px; border-left: none; border-bottom: none; }
.certificate-corner-bl { bottom: 12px; left: 12px; border-right: none; border-top: none; }
.certificate-corner-br { bottom: 12px; right: 12px; border-left: none; border-top: none; }

/* Test Engine Palette */
.palette-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
}
.palette-unanswered {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}
.palette-answered {
    background-color: #10b981;
    color: white;
    border: 1px solid #059669;
}
.palette-review {
    background-color: #8b5cf6;
    color: white;
    border: 1px solid #7c3aed;
}
.palette-current {
    ring: 3px solid #3b82f6;
    ring-offset: 2px;
}

/* Print Specific Rules */
@media print {
    body * {
        visibility: hidden;
    }
    .print-only-area, .print-only-area * {
        visibility: visible;
    }
    .print-only-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
    }
    .no-print {
        display: none !important;
    }
}
