/* ==========================================================================
   E-SMARTEOP LIGHT ROYAL IVORY & EMERALD LOGIN PORTAL STYLING
   Palet: Warm Ivory (#FBFBF7), Songket Tenun Siak, Royal Emerald (#0B4632), Emas (#C59B27)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --warm-ivory: #FBFBF7;
    --warm-ivory-dark: #F5ECD8;
    --royal-emerald: #0B4632;
    --royal-emerald-light: #10B981;
    --royal-emerald-dark: #062B20;
    --royal-gold: #C59B27;
    --royal-gold-light: #E5A93C;
    --royal-gold-subtle: rgba(197, 155, 39, 0.12);
    --royal-gold-border: rgba(197, 155, 39, 0.35);
    --text-primary: #1C2E24;
    --text-secondary: #586B61;
    --admin-blue: #0284C7;
}

body.login-body {
    background-color: var(--warm-ivory);
    background-image: 
        radial-gradient(circle at 50% 12%, rgba(255, 255, 255, 0.96) 0%, rgba(251, 248, 240, 0.85) 60%, rgba(245, 236, 216, 0.7) 100%),
        url('/assets/ornaments/songket_tenun_siak.svg');
    background-repeat: no-repeat, repeat;
    background-size: 100% 100%, 48px 48px;
    min-height: 100vh;
    margin: 0;
    padding: 30px 16px;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Authentic Malay Riau Ornaments */
.login-awan-larat-tl {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 240px;
    background: url('/assets/ornaments/awan_larat_riau_tl.png?v=2.0') no-repeat top left;
    background-size: contain;
    pointer-events: none;
    z-index: 1;
    opacity: 0.28;
    mix-blend-mode: multiply;
}

.login-awan-larat-tr {
    position: fixed;
    top: 0;
    right: 0;
    width: 310px;
    height: 310px;
    background: url('/assets/ornaments/awan_larat_riau_tr.png?v=2.0') no-repeat top right;
    background-size: contain;
    pointer-events: none;
    z-index: 1;
    opacity: 0.32;
    mix-blend-mode: multiply;
}

.royal-border-top {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #C59B27 0%, #F5ECD8 25%, #0B4632 50%, #F5ECD8 75%, #C59B27 100%);
    z-index: 9999;
}

/* Page Layout */
.login-page-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 10;
    margin: auto;
}

/* Centered Official Brand Header */
.login-brand-header {
    text-align: center;
    margin-bottom: 14px;
}

.login-brand-logo {
    height: 52px;
    max-width: 220px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(11, 70, 50, 0.12));
    transition: transform 0.25s ease;
}

.login-brand-logo:hover {
    transform: scale(1.04);
}

.login-back-wrapper {
    text-align: center;
    margin-bottom: 16px;
}

.btn-back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--royal-emerald);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 20px;
    border: 1px solid var(--royal-gold-border);
    box-shadow: 0 2px 8px rgba(11, 70, 50, 0.05);
    transition: all 0.2s ease;
}

.btn-back-home:hover {
    color: var(--royal-emerald-dark);
    background: #FFFFFF;
    border-color: var(--royal-gold);
    box-shadow: 0 4px 14px rgba(197, 155, 39, 0.22);
    transform: translateY(-1px);
}

/* Switcher Tabs */
.portal-tabs-nav {
    display: grid;
    background: rgba(255, 255, 255, 0.75);
    border: 1.5px solid var(--royal-gold-border);
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    padding: 5px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.portal-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.25s ease;
}

.portal-tab-btn:hover {
    color: var(--royal-emerald);
    background: rgba(255, 255, 255, 0.95);
}

.portal-tab-btn.active.tab-mahasiswa {
    background: linear-gradient(135deg, #E5A93C 0%, #C59B27 100%);
    color: #062B20;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(197, 155, 39, 0.35);
}

.portal-tab-btn.active.tab-dosen {
    background: linear-gradient(135deg, #10B981 0%, #0B4632 100%);
    color: #FFFFFF;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(11, 70, 50, 0.3);
}

.portal-tab-btn.active.tab-admin {
    background: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%);
    color: #FFFFFF;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
}

/* Login Card */
.login-card {
    background: #FFFFFF;
    border: 1.5px solid var(--royal-gold-border);
    border-radius: 0 0 20px 20px;
    padding: 30px 26px 24px;
    box-shadow: 0 20px 48px rgba(11, 70, 50, 0.08), 0 4px 14px rgba(197, 155, 39, 0.1);
    position: relative;
    box-sizing: border-box;
}

.portal-icon-badge {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(197, 155, 39, 0.1);
    border: 1.5px solid var(--royal-gold);
    color: var(--royal-gold);
}

.portal-card-dosen .portal-icon-badge {
    background: rgba(11, 70, 50, 0.08);
    border: 1.5px solid var(--royal-emerald);
    color: var(--royal-emerald);
}

.portal-card-admin .portal-icon-badge {
    background: rgba(2, 132, 199, 0.08);
    border: 1.5px solid var(--admin-blue);
    color: var(--admin-blue);
}

.portal-category-tag {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--royal-gold);
    margin-bottom: 6px;
}

.portal-card-dosen .portal-category-tag {
    color: var(--royal-emerald);
}

.portal-card-admin .portal-category-tag {
    color: var(--admin-blue);
}

.login-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--royal-emerald);
    margin: 0 0 6px 0;
}

.login-subtitle {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0 0 22px 0;
}

/* Alerts */
.alert-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.86rem;
    margin-bottom: 18px;
    text-align: left;
}

.alert-danger {
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    color: #991B1B;
}

.alert-success {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    color: #065F46;
}

/* Form Styling */
.login-form {
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--royal-emerald);
    margin-bottom: 6px;
}

.login-input {
    width: 100%;
    background: #F4F6F5;
    border: 1.5px solid #D6DFDB;
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-family: inherit;
    transition: all 0.25s ease;
    box-sizing: border-box;
}

.login-input:focus {
    outline: none;
    background: #FFFFFF;
    border-color: var(--royal-emerald);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.portal-card-mahasiswa .login-input:focus {
    border-color: var(--royal-gold);
    box-shadow: 0 0 0 3px rgba(197, 155, 39, 0.2);
}

.portal-card-admin .login-input:focus {
    border-color: var(--admin-blue);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.2);
}

/* Submit Buttons */
.btn-portal-submit {
    width: 100%;
    padding: 13px;
    border-radius: 10px;
    border: none;
    font-weight: 800;
    font-size: 0.96rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    margin-top: 6px;
}

.btn-submit-mahasiswa {
    background: linear-gradient(135deg, #E5A93C 0%, #C59B27 100%);
    color: #062B20;
    box-shadow: 0 4px 16px rgba(197, 155, 39, 0.35);
}

.btn-submit-mahasiswa:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(197, 155, 39, 0.45);
    filter: brightness(1.04);
}

.btn-submit-dosen {
    background: linear-gradient(135deg, #10B981 0%, #0B4632 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(11, 70, 50, 0.3);
}

.btn-submit-dosen:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(11, 70, 50, 0.4);
    filter: brightness(1.05);
}

.btn-submit-admin {
    background: linear-gradient(135deg, #38BDF8 0%, #0284C7 100%);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.3);
}

.btn-submit-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(2, 132, 199, 0.4);
    filter: brightness(1.05);
}

/* Institutional Notice Info for Students */
.info-card-mahasiswa {
    margin-top: 16px;
    padding: 10px 14px;
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 10px;
    text-align: center;
}

.info-card-mahasiswa small {
    color: #065F46;
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    line-height: 1.4;
}

/* Footer */
.login-footer {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid #E5E7EB;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-footer a {
    color: var(--royal-gold);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.82rem;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .login-page-container {
        padding: 10px 6px;
    }
    .login-card {
        padding: 22px 16px 18px;
    }
    .login-title {
        font-size: 1.4rem;
    }
    .login-awan-larat-tl {
        width: 140px;
        height: 140px;
    }
    .login-awan-larat-tr {
        width: 180px;
        height: 180px;
    }
}

/* High-Contrast Luxury Modal Styles on Login Page */
.luxury-modal-card h3,
.luxury-modal-card h3.luxury-modal-title,
.luxury-modal-title {
    color: #FFFFFF !important;
    font-family: 'Playfair Display', serif !important;
    letter-spacing: -0.2px;
}

.luxury-modal-message {
    color: rgba(255, 255, 255, 0.95) !important;
}

.luxury-modal-card a,
.luxury-modal-message a {
    color: #FDE68A !important;
    text-decoration: underline !important;
    font-weight: 800 !important;
    transition: color 0.2s ease;
}

.luxury-modal-card a:hover,
.luxury-modal-message a:hover {
    color: #FBBF24 !important;
}

