﻿/* Al Buraimi Governorate Portal - Simplified CSS */

/* =============================================
   GLOBAL STYLES
   ============================================= */

/* Default  */
@import url("https://fonts.googleapis.com/css2?family=Red+Hat+Display:wght@300;400;500;600;700;800;900&amp;display=swap");
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&amp;display=swap");

:root {
    --primary-navy: #0c174c;
    --secondary-orange: #e28812;
    --accent-yellow: #ffaa2e;
    --tertiary-blue: #36469d;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --success: #28a745;
    --danger: #dc3545;
    --border-color: #dee2e6;
}

* {
    font-family: "Alexandria", -apple-system, "Inter", sans-serif;
    box-sizing: border-box;
}

body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--dark-gray);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* =============================================
   FIXED HEADER
   ============================================= */

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary-navy) 0%, #1a2955 100%);
    height: 150px;
    transition: height 0.3s ease;
    box-shadow: 0 4px 20px rgba(12, 23, 76, 0.3);
}

.fixed-header.scrolled {
    height: 120px;
}

.fixed-header .container-fluid {
    height: 100%;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    padding: 10px 0;
}

.logo-left, .logo-right {
    flex: 0 0 auto;
}

.vision-logo, .main-logo {
    height: 140px;
    width: auto;
    max-width: 100%;
    transition: height 0.3s;
    display: block;
}

.fixed-header.scrolled .vision-logo,
.fixed-header.scrolled .main-logo {
    height: 50px;
}

.header-center {
    flex: 1;
    text-align: center;
    color: var(--white);
}

.header-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header-subtitle {
    font-size: 16px;
    font-weight: 600;
    margin: 2px 0;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.header-motto {
    font-size: 12px;
    font-weight: 400;
    margin: 2px 0 0 0;
    color: var(--accent-yellow);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-style: italic;
}

.fixed-header.scrolled .header-title {
    font-size: 18px;
}

.fixed-header.scrolled .header-subtitle {
    font-size: 14px;
}

.fixed-header.scrolled .header-motto {
    display: none;
}

.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    height: 30px;
}

.btn-lang {
    background: var(--secondary-orange);
    border: 2px solid rgba(255,255,255,0.3);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .btn-lang:hover {
        background: #d17a0f;
        transform: translateY(-1px);
    }

.emergency-btn {
    background: var(--danger);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 10px;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* =============================================
   MAIN CONTENT
   ============================================= */

.main-content {
    margin-top: 140px;
    padding: 40px 0;
    min-height: calc(100vh - 140px);
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.page-title {
    color: var(--primary-navy);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.page-subtitle {
    color: var(--medium-gray);
    font-size: 16px;
    margin: 0;
}

/* =============================================
   LOGIN CARD
   ============================================= */

.login-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(12, 23, 76, 0.1);
    padding: 40px;
    border-top: 4px solid var(--secondary-orange);
}

.user-types {
    margin-bottom: 30px;
    text-align: center;
}

.section-title {
    color: var(--primary-navy);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.type-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background: var(--white);
    color: var(--medium-gray);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

    .type-btn:hover {
        border-color: var(--secondary-orange);
        color: var(--secondary-orange);
        transform: translateY(-2px);
    }

input[type="radio"]:checked + .type-btn {
    background: var(--secondary-orange);
    border-color: var(--secondary-orange);
    color: var(--white);
}

.type-btn i {
    font-size: 24px;
}

.type-btn span {
    font-weight: 600;
    font-size: 14px;
}

/* User Type Tabs */
.user-type-tabs {
    border-bottom: none;
    gap: 10px;
}

    .user-type-tabs .nav-link {
        background: #f5f5f5;
        color: var(--primary-navy);
        border: none;
        border-radius: 25px !important;
        margin: 0 4px;
        font-weight: 700;
        font-size: 16px;
        padding: 12px 32px;
        transition: background 0.2s, color 0.2s, box-shadow 0.2s;
        box-shadow: 0 2px 8px rgba(12, 23, 76, 0.04);
        position: relative;
        z-index: 1;
    }

        .user-type-tabs .nav-link.active {
            background: var(--secondary-orange);
            color: #fff;
            box-shadow: 0 4px 16px rgba(226, 136, 18, 0.10);
        }

        .user-type-tabs .nav-link:hover:not(.active) {
            background: #ffe3b8;
            color: var(--secondary-orange);
            box-shadow: 0 2px 12px rgba(226, 136, 18, 0.08);
        }

        .user-type-tabs .nav-link i {
            margin-left: 8px;
            font-size: 18px;
        }

        .user-type-tabs .nav-link span {
            font-size: 15px;
        }

/* =============================================
   FORM STYLES
   ============================================= */

.login-form {
    margin-top: 30px;
}

.form-fields {
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        color: var(--dark-gray);
        font-weight: 600;
        font-size: 14px;
    }

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background: var(--white);
}

    .form-control:focus {
        outline: none;
        border-color: var(--secondary-orange);
        box-shadow: 0 0 0 3px rgba(226, 136, 18, 0.1);
    }

    .form-control.is-invalid {
        border-color: var(--danger);
    }

    .form-control.is-valid {
        border-color: var(--success);
    }

.invalid-feedback {
    color: var(--danger);
    font-size: 12px;
    margin-top: 5px;
}

.form-options {
    margin: 20px 0;
    text-align: center;
}

.checkbox-label {
    font-size: 14px;
    color: var(--medium-gray);
    cursor: pointer;
}

    .checkbox-label input {
        margin-left: 8px;
    }

.btn-submit {
    width: 100%;
    padding: 15px;
    background: var(--secondary-orange);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

    .btn-submit:hover {
        background: #d17a0f;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(226, 136, 18, 0.3);
    }

.form-links {
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
}

    .form-links .link {
        color: var(--medium-gray);
        text-decoration: none;
        font-size: 14px;
        margin: 0 15px;
        transition: color 0.3s ease;
    }

        .form-links .link:hover {
            color: var(--secondary-orange);
        }

/* =============================================
   STATUS SECTION
   ============================================= */

.status-section {
    background: var(--white);
    padding: 40px 0;
    margin-top: 40px;
    border-top: 3px solid var(--secondary-orange);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.status-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 10px;
    transition: transform 0.3s ease;
    height: 100%;
}

    .status-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        background: var(--white);
    }

.status-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-orange);
    color: var(--white);
    font-size: 20px;
}

.status-info h6 {
    margin: 0 0 5px 0;
    color: var(--dark-gray);
    font-weight: 600;
    font-size: 14px;
}

.status-text {
    color: var(--success);
    font-weight: 700;
    font-size: 12px;
}

.status-number {
    color: var(--secondary-orange);
    font-weight: 700;
    font-size: 16px;
}

/* =============================================
   FOOTER
   ============================================= */

.main-footer {
    background: var(--primary-navy);
    color: var(--white);
    padding: 40px 0 20px;
    margin-top: 60px;
}

    .main-footer h5 {
        color: var(--accent-yellow);
        margin-bottom: 20px;
        font-weight: 700;
    }

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .footer-links li {
        margin-bottom: 10px;
    }

    .footer-links a {
        color: rgba(255,255,255,0.8);
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .footer-links a:hover {
            color: var(--accent-yellow);
        }

.contact-info div {
    margin-bottom: 10px;
    color: rgba(255,255,255,0.8);
    font-size: 14px;
}

.contact-info i {
    width: 20px;
    color: var(--accent-yellow);
}

.main-footer hr {
    border-color: rgba(255,255,255,0.2);
    margin: 30px 0 20px 0;
}

.main-footer p {
    color: rgba(255,255,255,0.7);
    margin: 0;
    font-size: 14px;
}

/* =============================================
   LOADING & MODAL
   ============================================= */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 23, 76, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    color: var(--white);
}

    .loading-overlay p {
        margin-top: 20px;
        font-size: 16px;
        font-weight: 600;
    }

.redirect-info {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.progress {
    height: 6px;
    border-radius: 3px;
    margin-top: 10px;
}

.progress-bar {
    background: var(--secondary-orange);
    transition: width 1s linear;
}

/* =============================================
   RESPONSIVE DESIGN - SIMPLIFIED
   ============================================= */

/* Large Desktop (1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .header-title {
        font-size: 22px;
    }

    .header-subtitle {
        font-size: 15px;
    }
}

/* Desktop (992px - 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .fixed-header {
        height: 150px;
    }

    .fixed-header.scrolled {
        height: 120px;
    }

    .main-content {
        margin-top: 130px;
    }

    .vision-logo, .main-logo {
        height: 55px;
    }

    .fixed-header.scrolled .vision-logo,
    .fixed-header.scrolled .main-logo {
        height: 35px;
    }

    .header-title {
        font-size: 20px;
    }

    .header-subtitle {
        font-size: 14px;
    }

    .fixed-header.scrolled .header-title {
        font-size: 16px;
    }

    .fixed-header.scrolled .header-subtitle {
        font-size: 12px;
    }

    .page-title {
        font-size: 32px;
    }
}

/* Tablet (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .fixed-header {
        height: 100px;
    }

    .fixed-header.scrolled {
        height: 70px;
    }

    .main-content {
        margin-top: 120px;
    }

    .vision-logo, .main-logo {
        height: 50px;
    }

    .fixed-header.scrolled .vision-logo,
    .fixed-header.scrolled .main-logo {
        height: 35px;
    }

    .header-title {
        font-size: 20px;
    }

    .header-subtitle {
        font-size: 14px;
    }

    .fixed-header.scrolled .header-title {
        font-size: 16px;
    }

    .fixed-header.scrolled .header-subtitle {
        font-size: 12px;
    }

    .page-title {
        font-size: 26px;
    }

    .login-card {
        padding: 35px 25px;
        margin: 0 20px;
    }

    .type-buttons {
        gap: 12px;
    }

    .type-btn {
        min-width: 110px;
        padding: 12px 16px;
    }
}

/* Mobile Large (576px - 767px) */
@media (min-width: 576px) and (max-width: 767px) {
    .fixed-header {
        height: 90px;
    }

        .fixed-header.scrolled {
            height: 65px;
        }

    .main-content {
        margin-top: 110px;
    }

    .vision-logo, .main-logo {
        height: 45px;
    }

    .fixed-header.scrolled .vision-logo,
    .fixed-header.scrolled .main-logo {
        height: 30px;
    }

    .header-title {
        font-size: 18px;
    }

    .header-subtitle {
        font-size: 13px;
    }

    .header-motto {
        font-size: 10px;
    }

    .fixed-header.scrolled .header-title {
        font-size: 14px;
    }

    .fixed-header.scrolled .header-subtitle {
        font-size: 11px;
    }

    .page-title {
        font-size: 24px;
    }

    .page-subtitle {
        font-size: 15px;
    }

    .login-card {
        padding: 30px 20px;
        margin: 0 15px;
    }

    .type-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .type-btn {
        width: 100%;
        max-width: 200px;
        padding: 15px;
    }

    .status-card {
        padding: 15px;
    }
}

/* Mobile (320px - 575px) */
@media (max-width: 575px) {
    .fixed-header {
        height: 80px;
    }

        .fixed-header.scrolled {
            height: 55px;
        }

    .main-content {
        margin-top: 100px;
    }

    .fixed-header .container-fluid {
        padding: 0 10px;
    }

    .vision-logo, .main-logo {
        height: 40px;
    }

    .fixed-header.scrolled .vision-logo,
    .fixed-header.scrolled .main-logo {
        height: 25px;
    }

    .header-title {
        font-size: 16px;
    }

    .header-subtitle {
        font-size: 12px;
    }

    .header-motto {
        font-size: 9px;
    }

    .fixed-header.scrolled .header-title {
        font-size: 12px;
    }

    .fixed-header.scrolled .header-subtitle {
        font-size: 10px;
    }

    .header-actions {
        height: 25px;
        padding: 2px 0;
    }

    .btn-lang, .emergency-btn {
        padding: 3px 6px;
        font-size: 8px;
    }

    .page-title {
        font-size: 22px;
    }

    .page-subtitle {
        font-size: 14px;
    }

    .login-card {
        padding: 25px 15px;
        margin: 0 10px;
    }

    .type-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .type-btn {
        width: 100%;
        max-width: 180px;
        padding: 12px;
    }

        .type-btn i {
            font-size: 20px;
        }

        .type-btn span {
            font-size: 13px;
        }

    .form-control {
        padding: 10px 12px;
        font-size: 14px;
    }

    .btn-submit {
        padding: 12px;
        font-size: 14px;
    }

    .status-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 15px;
    }

    .status-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .status-info h6 {
        font-size: 12px;
    }

    .status-text, .status-number {
        font-size: 11px;
    }

    .main-footer {
        padding: 30px 0 15px;
    }

        .main-footer h5 {
            font-size: 16px;
        }

    .footer-links a,
    .contact-info div {
        font-size: 12px;
    }
}

/* Extra Small Mobile (320px and below) */
@media (max-width: 320px) {
    .fixed-header {
        height: 75px;
    }

        .fixed-header.scrolled {
            height: 50px;
        }

    .main-content {
        margin-top: 95px;
    }

    .login-card {
        padding: 20px 12px;
        margin: 0 8px;
    }

    .page-title {
        font-size: 20px;
    }

    .type-btn {
        max-width: 160px;
        padding: 10px;
    }
}

/* Landscape Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .fixed-header {
        height: 60px;
    }

        .fixed-header.scrolled {
            height: 45px;
        }

    .main-content {
        margin-top: 80px;
        padding: 20px 0;
    }

    .header-motto {
        display: none;
    }

    .login-card {
        padding: 20px;
    }

    .welcome-section {
        margin-bottom: 20px;
    }
}

/* Print Styles */
@media print {
    .fixed-header,
    .main-footer,
    .loading-overlay,
    .modal {
        display: none !important;
    }

    .main-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .login-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Animation Classes */
.shake {
    animation: shake 0.6s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-8px);
    }

    75% {
        transform: translateX(8px);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    z-index: 10000;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 576px) {
    .notification {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

.tab-pane.fade {
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 0;
    transform: translateY(20px);
}

    .tab-pane.fade.show {
        opacity: 1;
        transform: translateY(0);
    }

/* Custom Navbar Styles */
.custom-navbar {
    font-family: 'Cairo', 'Amiri', sans-serif;
    background: none !important;
    border: none !important;
    box-shadow: none;
    position: relative;
    z-index: 1051;
}

    .custom-navbar .navbar-brand {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        position: relative;
        z-index: 1060;
    }

        .custom-navbar .navbar-brand img {
            width: 36px;
            height: 36px;
            min-width: 36px;
            min-height: 36px;
            object-fit: contain;
            filter: drop-shadow(0 0 2px #0a234a);
            background: #fff;
            border-radius: 50%;
            border: 2px solid #ff9800;
            box-shadow: 0 1px 4px rgba(10,35,74,0.08);
            transition: width 0.3s, height 0.3s;
        }

@media (max-width: 991.98px) {
    .custom-navbar .navbar-brand img {
        width: 48px;
        height: 48px;
        min-width: 48px;
        min-height: 48px;
    }
}

@media (max-width: 575.98px) {
    .custom-navbar .navbar-brand img {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
}

.custom-navbar .navbar-brand span {
    color: #ff9800;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
    font-weight: 700;
}

.custom-navbar .nav-link {
    color: #fff !important;
    font-weight: 500;
    transition: color 0.2s, background 0.2s;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
}

    .custom-navbar .nav-link.active, .custom-navbar .nav-link:hover, .custom-navbar .nav-link:focus {
        color: #0a234a !important;
        background: #ff9800;
    }

.custom-navbar .dropdown-menu {
    background: #0a234a;
    border-radius: 0.5rem;
    min-width: 180px;
    text-align: right;
    border: none;
    box-shadow: 0 2px 8px rgba(10, 35, 74, 0.07);
    margin-top: 0.5rem;
}

.custom-navbar .dropdown-item {
    color: #fff;
    font-weight: 500;
    border-radius: 0.25rem;
    transition: background 0.2s, color 0.2s;
}

    .custom-navbar .dropdown-item:hover, .custom-navbar .dropdown-item:focus {
        background: #ff9800;
        color: #0a234a;
    }

@media (max-width: 991.98px) {
    .custom-navbar .navbar-collapse {
        background: #0a234a;
        border-radius: 0 0 0.5rem 0.5rem;
        margin-top: 0.5rem;
        box-shadow: 0 2px 8px rgba(10, 35, 74, 0.07);
        padding: 3rem 0.5rem;
        position: fixed;
        top: 0;
        right: 0;
        left: 0;
        width: 100vw;
        min-width: 0;
        z-index: 1200;
        height: auto;
        max-height: 100vh;
        overflow-y: auto;
        border-radius: 0 0 1.5rem 1.5rem;
        border-top: 0;
        border-bottom: 2px solid #ff9800;
        animation: navDropDown 0.3s cubic-bezier(.4,2,.6,1) both;
        direction: ltr;
        text-align: left;
    }

    [dir="rtl"] .custom-navbar .navbar-collapse {
        direction: rtl;
        text-align: right;
    }

    .custom-navbar .navbar-nav {
        gap: 0.5rem;
        width: 100%;
        /* text-align: right;
        direction: ltr; */
    }

    [dir="rtl"] .custom-navbar .navbar-nav {
        direction: rtl;
        text-align: right;
    }

    .custom-navbar .navbar-brand {
        position: fixed;
        right: 1rem;
        top: 1rem;
        background: #fff;
        border-radius: 2rem;
        padding: 0.25rem 0.75rem;
        box-shadow: 0 1px 4px rgba(10,35,74,0.08);
        z-index: 1300;
    }

    .custom-navbar .navbar-toggler {
        z-index: 1301;
        background-color: #d17a0f;
        position: fixed; 
        top: 0.5rem;
    }

    @keyframes navDropDown {
        0% {
            transform: translateY(-40px);
            opacity: 0;
        }

        100% {
            transform: translateY(0);
            opacity: 1;
        }
    }
}
