/* ========================================
   KHONZA NGWATHE CUSTOM AUTHENTICATION STYLING
   ======================================== */

:root {
    --auth-terracotta: #BC6C25;
    --auth-river-green: #2D6A4F;
    --auth-sunset-gold: #F4A261;
    --auth-charcoal: #344E41;
    --auth-light-cream: #FFF8F0;
    --auth-dark-overlay: rgba(0, 0, 0, 0.65);
    --auth-text-white: #F5F5F5;
}

/* ========================================
   PAGE LAYOUT & BACKGROUND
   ======================================== */

body.auth-page-body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #1a1a1a;
    color: var(--auth-text-white);
    overflow-x: hidden;
}

.auth-hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #8B4513 0%, #BC6C25 25%, #F4A261 50%, #D2691E 75%, #8B4513 100%);
    background-size: 400% 400%;
    z-index: 0;
    overflow: hidden;
}

@keyframes sunset-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-hero-background {
    animation: sunset-flow 15s ease infinite;
}

.auth-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--auth-dark-overlay);
    z-index: 1;
}

/* Bridge SVG accent - positioned top-left */
.auth-bridge-accent {
    position: absolute;
    top: 2rem;
    left: 2rem;
    width: 100px;
    height: 50px;
    opacity: 0.15;
    z-index: 2;
    animation: float-gentle 4s ease-in-out infinite;
}

@keyframes float-gentle {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Protea flower accent - positioned top-right */
.auth-protea-accent {
    position: absolute;
    top: 3rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    opacity: 0.12;
    z-index: 2;
    animation: float-gentle-reverse 5s ease-in-out infinite;
}

@keyframes float-gentle-reverse {
    0%, 100% { transform: translateY(0px) rotateZ(0deg); }
    50% { transform: translateY(-10px) rotateZ(2deg); }
}

/* Water ripple animation - positioned bottom-right */
.auth-ripple-animation {
    position: absolute;
    bottom: 3rem;
    right: 2rem;
    width: 120px;
    height: 120px;
    opacity: 0.1;
    z-index: 2;
}

.auth-ripple-animation circle {
    animation: ripple-out 3s ease-out infinite;
}

.auth-ripple-animation circle:nth-child(1) {
    animation-delay: 0s;
}

.auth-ripple-animation circle:nth-child(2) {
    animation-delay: 1s;
}

.auth-ripple-animation circle:nth-child(3) {
    animation-delay: 2s;
}

@keyframes ripple-out {
    0% {
        r: 10px;
        opacity: 0.8;
    }
    100% {
        r: 50px;
        opacity: 0;
    }
}

/* ========================================
   MAIN CONTAINER & LAYOUT
   ======================================== */

.auth-page-container {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

@media (max-width: 768px) {
    .auth-page-container {
        padding: 1rem;
        justify-content: flex-start;
        padding-top: 3rem;
    }
}

/* ========================================
   HEADER & LOGO
   ======================================== */

.auth-page-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: slideDown 0.6s ease-out;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-logo-section {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.08);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid rgba(244, 162, 97, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.auth-logo-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--auth-sunset-gold);
    margin: 0;
    letter-spacing: 0.5px;
}

.auth-logo-subtext {
    font-size: 0.95rem;
    color: rgba(255, 248, 240, 0.8);
    margin: 0.5rem 0 0;
    font-weight: 300;
}

/* Navigation links in auth header */
.auth-nav-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.auth-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--auth-text-white);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid rgba(244, 162, 97, 0.3);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-nav-link:hover {
    background: rgba(188, 108, 37, 0.25);
    border-color: var(--auth-sunset-gold);
    color: var(--auth-sunset-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 162, 97, 0.3);
}

.auth-nav-link i {
    font-size: 1rem;
}

@media (max-width: 480px) {
    .auth-logo-text {
        font-size: 2rem;
    }
    
    .auth-logo-subtext {
        font-size: 0.85rem;
    }
}

/* ========================================
   MAIN CONTENT AREA
   ======================================== */

.auth-page-main {
    width: 100%;
    max-width: 460px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   CARD & FORM STYLES
   ======================================== */

.auth-card {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(244, 162, 97, 0.15);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    margin-bottom: 1.5rem;
}

@media (max-width: 480px) {
    .auth-card {
        padding: 1.75rem 1.25rem;
    }
}

.auth-card-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--auth-sunset-gold);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.auth-card-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 248, 240, 0.75);
    margin-bottom: 2rem;
    line-height: 1.4;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

.auth-form-group {
    margin-bottom: 1.5rem;
}

.auth-form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 248, 240, 0.9);
    margin-bottom: 0.5rem;
    display: block;
}

.auth-form-input,
.auth-form-select,
.auth-form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(244, 162, 97, 0.3);
    border-radius: 8px;
    color: var(--auth-text-white);
    transition: all 0.3s ease;
    font-family: inherit;
}

.auth-form-input::placeholder,
.auth-form-select::placeholder {
    color: rgba(255, 248, 240, 0.5);
}

.auth-form-input:focus,
.auth-form-select:focus,
.auth-form-textarea:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--auth-sunset-gold);
    outline: none;
    box-shadow: 0 0 0 3px rgba(244, 162, 97, 0.1);
}

.auth-form-input:valid,
.auth-form-select:valid {
    border-color: #4CAF50;
}

.auth-form-input:invalid:not(:placeholder-shown),
.auth-form-select:invalid:not(:placeholder-shown) {
    border-color: #FF6B6B;
}

.auth-form-select {
    cursor: pointer;
}

.auth-form-select option {
    background: var(--auth-charcoal);
    color: var(--auth-light-cream);
}

/* ========================================
   CHECKBOX & RADIO STYLES
   ======================================== */

.auth-checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.auth-checkbox input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: var(--auth-sunset-gold);
}

.auth-checkbox label {
    margin: 0;
    cursor: pointer;
    font-size: 0.9rem;
}

/* ========================================
   BUTTON STYLES
   ======================================== */

.auth-btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-btn:active::before {
    width: 300px;
    height: 300px;
}

/* Primary Button (Terracotta) */
.auth-btn-primary {
    background: var(--auth-terracotta);
    color: var(--auth-light-cream);
    box-shadow: 0 4px 15px rgba(188, 108, 37, 0.3);
}

.auth-btn-primary:hover {
    background: #A85A1F;
    box-shadow: 0 6px 20px rgba(188, 108, 37, 0.5);
    transform: translateY(-2px);
}

.auth-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(188, 108, 37, 0.3);
}

.auth-btn-primary:disabled {
    background: rgba(188, 108, 37, 0.5);
    cursor: not-allowed;
    box-shadow: none;
}

/* Secondary Button (River Green) */
.auth-btn-secondary {
    background: rgba(45, 106, 79, 0.3);
    color: var(--auth-sunset-gold);
    border: 2px solid var(--auth-river-green);
}

.auth-btn-secondary:hover {
    background: rgba(45, 106, 79, 0.5);
    border-color: var(--auth-sunset-gold);
    box-shadow: 0 4px 15px rgba(45, 106, 79, 0.3);
}

/* External Button (Google) */
.auth-btn-external {
    background: var(--auth-light-cream);
    color: var(--auth-charcoal);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border: 2px solid var(--auth-terracotta);
}

.auth-btn-external:hover {
    background: #FFF0E6;
    box-shadow: 0 4px 15px rgba(244, 162, 97, 0.3);
    transform: translateY(-2px);
}

.auth-btn-external img {
    width: 20px;
    height: 20px;
}

/* ========================================
   VALIDATION & ERROR STYLES
   ======================================== */

.auth-error-alert {
    background: rgba(255, 107, 107, 0.15);
    border: 1px solid rgba(255, 107, 107, 0.4);
    color: #FF9999;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.auth-error-alert i {
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.auth-error-alert ul {
    margin: 0;
    padding-left: 1.25rem;
}

.auth-error-alert li {
    margin-bottom: 0.5rem;
}

.auth-success-alert {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.4);
    color: #90EE90;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.auth-field-error {
    color: #FF9999;
    font-size: 0.85rem;
    margin-top: 0.4rem;
    display: block;
}

/* ========================================
   LINKS & NAVIGATION
   ======================================== */

.auth-link {
    color: var(--auth-sunset-gold);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.auth-link:hover {
    color: #FFB384;
    border-bottom-color: var(--auth-sunset-gold);
}

.auth-link-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.auth-link-group a {
    color: rgba(255, 248, 240, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.auth-link-group a:hover {
    color: var(--auth-sunset-gold);
}

/* ========================================
   DIVIDER STYLES
   ======================================== */

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    color: rgba(255, 248, 240, 0.5);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(244, 162, 97, 0.2);
}

/* ========================================
   FOOTER
   ======================================== */

.auth-page-footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(244, 162, 97, 0.15);
    animation: slideUp 0.8s ease-out 0.3s both;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-footer-text {
    color: rgba(255, 248, 240, 0.7);
    font-size: 0.9rem;
    margin: 0;
}

/* ========================================
   LOADING & SPINNER
   ======================================== */

.auth-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(244, 162, 97, 0.3);
    border-radius: 50%;
    border-top-color: var(--auth-sunset-gold);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.auth-btn:disabled .auth-spinner {
    margin-right: 0.5rem;
}

/* ========================================
   COUNTDOWN TIMER STYLES
   ======================================== */

.auth-countdown-container {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 2rem 0;
}

.auth-countdown-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
}

.auth-countdown-circle {
    position: absolute;
    width: 120px;
    height: 120px;
    top: 0;
    left: 0;
}

.auth-countdown-circle-bg {
    fill: none;
    stroke: rgba(244, 162, 97, 0.1);
    stroke-width: 8;
}

.auth-countdown-circle-progress {
    fill: none;
    stroke: var(--auth-sunset-gold);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 376.99;
    stroke-dashoffset: 0;
    transform: rotate(-90deg);
    transform-origin: 50% 50%;
    transition: stroke-dashoffset 1s linear;
}

.auth-countdown-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--auth-sunset-gold);
}

.auth-countdown-label {
    color: rgba(255, 248, 240, 0.8);
    font-size: 0.95rem;
    margin-top: 1rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .auth-page-main {
        max-width: 100%;
        width: 100%;
    }
    
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .auth-card-title {
        font-size: 1.5rem;
    }
    
    .auth-bridge-accent {
        width: 70px;
        height: 35px;
        top: 1rem;
        left: 1rem;
    }
    
    .auth-protea-accent {
        width: 50px;
        height: 50px;
        top: 1.5rem;
        right: 1rem;
    }

    .auth-nav-links {
        gap: 0.5rem;
    }

    .auth-nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .auth-logo-section {
        padding: 1.5rem;
    }

    .auth-logo-text {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .auth-page-container {
        padding: 1rem;
        padding-top: 2rem;
    }
    
    .auth-page-header {
        margin-bottom: 2rem;
    }
    
    .auth-logo-section {
        padding: 1.5rem;
    }
    
    .auth-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .auth-btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
    }
    
    .auth-divider {
        gap: 0.75rem;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.auth-text-center {
    text-align: center;
}

.auth-mt-2 {
    margin-top: 1rem;
}

.auth-mt-3 {
    margin-top: 1.5rem;
}

.auth-mb-2 {
    margin-bottom: 1rem;
}

.auth-text-small {
    font-size: 0.85rem;
    color: rgba(255, 248, 240, 0.7);
}

.auth-text-success {
    color: #4CAF50;
}

.auth-text-error {
    color: #FF6B6B;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.auth-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.auth-focus-visible:focus {
    outline: 2px solid var(--auth-sunset-gold);
    outline-offset: 2px;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .auth-page-body {
        background: white;
    }
    
    .auth-hero-background,
    .auth-gradient-overlay {
        display: none;
    }
}
