/* ========== Global Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: url("../img/astrology.jpg");
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
    font-family: 'Google Sans', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    overflow: hidden;
}

/* ========== Main Container ========== */
.main-container {
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 16px;
}

/* ========== Hero Section ========== */
.hero-section {
    text-align: center;
    padding: 10px 0 0;
}

.hero-image {
    max-width: 420px;
    width: 92%;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.hero-image:hover {
    transform: scale(1.02);
}

/* ========== Content Wrapper ========== */
.content-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 8px 20px 12px;
}

.cards-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

/* ========== Info Card ========== */
.info-card {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.95) 0%, rgba(255, 140, 0, 0.9) 100%);
    border-radius: 24px;
    padding: 22px 26px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.1);
    height: 100%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.info-header {
    text-align: center;
    margin-bottom: 16px;
}

.title-tamil {
    color: #8B0000;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.5);
}

.title-underline {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #8B0000, #FFD700);
    border-radius: 2px;
    margin: 0 auto;
}

.info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.org-name {
    color: #4a0000;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 6px;
}

.org-role {
    color: #5c1a00;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.org-center {
    color: #5c1a00;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.org-location {
    color: #5c1a00;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.contact-section {
    width: 100%;
    background: rgba(139, 0, 0, 0.1);
    border-radius: 16px;
    padding: 12px 18px;
    margin-top: 6px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 6px 0;
    color: #4a0000;
    font-size: 20px;
    font-weight: 600;
}

.contact-item i {
    color: #8B0000;
    font-size: 22px;
    width: 20px;
}

/* ========== Login Card ========== */
.login-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 22px 26px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25),
                0 0 0 1px rgba(255, 255, 255, 0.3);
    height: 100%;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.login-header {
    text-align: center;
    margin-bottom: 18px;
}

.login-icon {
    font-size: 58px;
    color: #8B4513;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.login-title {
    color: #2c1810;
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 6px;
}

.login-subtitle {
    color: #666;
    font-size: 18px;
    font-weight: 500;
}

.login-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.login-field {
    margin-bottom: 12px;
    text-align: left;
}

.login-field-label {
    display: block;
    margin: 0 0 6px 4px;
    color: #6a4a3c;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.login-field-shell {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 52px;
    border: 1.5px solid rgba(139, 69, 19, 0.16);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, #f8f2ed 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
    transition: all 0.25s ease;
}

.login-field-shell::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #8B4513 0%, #d9a06e 100%);
}

.login-field-icon {
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B4513;
    font-size: 20px;
    flex: 0 0 46px;
}

.login-field-input {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    height: 52px;
    padding: 0 12px 0 0 !important;
    font-size: 18px;
    color: #2c1810;
    flex: 1;
    min-width: 0;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.password-toggle {
    border: 0;
    background: transparent;
    color: #9b6a52;
    cursor: pointer;
    width: 42px;
    height: 42px;
    margin-right: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex: 0 0 42px;
}

.password-toggle:hover {
    background: rgba(139, 69, 19, 0.08);
    color: #6f3413;
}

.password-toggle:focus {
    outline: none;
}

.password-toggle:focus-visible {
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.2);
}

.password-toggle i {
    font-size: 20px;
}

.login-field-input::placeholder {
    color: #a59084;
}

.login-field-shell:focus-within {
    border-color: rgba(139, 69, 19, 0.45);
    box-shadow: 0 0 0 4px rgba(139, 69, 19, 0.12), inset 0 1px 0 rgba(255,255,255,0.95);
    transform: translateY(-1px);
    background: linear-gradient(180deg, #fff 0%, #fff8f2 100%);
}

.login-field-shell:focus-within .login-field-icon {
    color: #6f3413;
}

.login-field-input:-webkit-autofill,
.login-field-input:-webkit-autofill:hover,
.login-field-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    -webkit-text-fill-color: #2c1810;
    transition: background-color 9999s ease-in-out 0s;
}

.login-field:last-of-type {
    margin-bottom: 6px;
}

.force-logout-msg {
    background: #fff0f0;
    border: 1.5px solid #dc3545;
    border-radius: 10px;
    color: #b91c1c;
    font-size: 17px;
    font-weight: 700;
    text-align: center;
    padding: 10px 14px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.error-message {
    color: #dc3545;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    margin: 6px 0;
    min-height: 16px;
}

.btn-login {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 19px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: auto;
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
    width: 100%;
}

.btn-login:hover {
    background: linear-gradient(135deg, #A0522D 0%, #8B4513 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

/* ========== Contact Link ========== */
.contact-link-wrapper {
    text-align: center;
    margin-top: 12px;
}

.contact-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(139, 69, 19, 0.8);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.contact-link:hover {
    background: rgba(139, 69, 19, 1);
    color: #FFD700;
    text-decoration: none;
    transform: translateY(-2px);
}

/* ========== Modal Styles ========== */
.modern-modal {
    border-radius: 20px;
    border: none;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.modern-modal .modal-header {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    border-radius: 20px 20px 0 0;
    border-bottom: none;
    padding: 20px 25px;
}

.modal-title {
    color: white;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title i {
    color: #FFD700;
}

.modern-modal .close {
    color: white;
    opacity: 0.9;
    text-shadow: none;
    font-size: 28px;
}

.modern-modal .close:hover {
    color: #FFD700;
    opacity: 1;
}

.modal-body {
    padding: 30px 25px;
}

.modal-info .org-name {
    font-size: 22px;
    color: #8B0000;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-info .org-role,
.modal-info .org-center,
.modal-info .org-location {
    font-size: 15px;
    color: #555;
    margin-bottom: 4px;
}

.modal-contact {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #eee;
}

.contact-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 15px;
    color: #333;
    font-weight: 600;
}

.contact-row i {
    color: #8B4513;
    font-size: 16px;
}

.modal-footer {
    border-top: 1px solid #eee;
    padding: 15px 25px;
    justify-content: center;
}

.btn-modal-close {
    background: linear-gradient(135deg, #8B4513 0%, #A0522D 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-modal-close:hover {
    background: linear-gradient(135deg, #A0522D 0%, #8B4513 100%);
    color: white;
    transform: translateY(-1px);
}

/* ========== Offline Badge ========== */
.offline-badge {
    display: none;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 2000;
    max-width: 300px;
    padding: 12px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #b00020 0%, #8b0000 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.offline-badge.show {
    display: block;
}

/* ========== Responsive Styles ========== */
@media (max-width: 768px) {
    .hero-image {
        max-width: 260px;
    }

    .content-wrapper {
        padding: 8px 15px 10px;
    }

    .info-card,
    .login-card {
        min-height: auto;
        padding: 18px 18px;
    }

    .title-tamil {
        font-size: 22px;
    }

    .login-title {
        font-size: 20px;
    }

    .login-icon {
        font-size: 42px;
    }

    .org-name {
        font-size: 18px;
    }

    .org-role,
    .org-center,
    .org-location {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .hero-image {
        max-width: 210px;
    }

    .info-card,
    .login-card {
        padding: 16px 14px;
    }

    .title-tamil {
        font-size: 20px;
    }

    .login-title {
        font-size: 18px;
    }

    .contact-item,
    .contact-row {
        font-size: 13px;
    }
}
