@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #234a9b;
    --primary-dark: #16397f;
    --primary-light: #edf3ff;
    --accent: #2f5fc7;
    --white: #ffffff;
    --text: #1d2a44;
    --muted: #6e7c96;
    --border: #d9e3f5;
    --shadow: 0 10px 30px rgba(24, 56, 126, 0.08);
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 8px;
    --transition: all 0.28s ease;
}

html {
    /* Removed custom font size to match client dashboard size exactly */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.auth-page {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(35, 74, 155, 0.08), transparent 35%),
        linear-gradient(135deg, #f7faff, #eef4ff 45%, #f8fbff);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

.auth-bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(8px);
    z-index: 0;
    pointer-events: none;
}

.shape-1 {
    width: 380px;
    height: 380px;
    background: rgba(47, 95, 199, 0.08);
    top: -120px;
    right: -100px;
}

.shape-2 {
    width: 520px;
    height: 520px;
    background: rgba(35, 74, 155, 0.06);
    left: -180px;
    bottom: -180px;
}

.auth-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    align-items: center;
    gap: 40px;
    padding: 40px;
    position: relative;
    z-index: 1;
}

.register-layout {
    grid-template-columns: 1.15fr 1.1fr;
}

.login-layout {
    grid-template-columns: 1fr 0.8fr;
}

.brand-panel {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(217, 227, 245, 0.9);
    border-radius: 30px;
    min-height: 720px;
    padding: 24px 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

.compact-brand {
    min-height: 620px;
}

.brand-top-line {
    width: 100%;
    height: 16px;
    background: var(--primary);
    border-radius: 12px;
    margin-bottom: 24px;
}

.brand-box {
    position: relative;
    z-index: 2;
}

.brand-mark {
    width: 160px;
    height: 110px;
    background: #0a0f18;
    clip-path: polygon(0 0, 100% 0, 62% 100%, 0 100%);
    margin-bottom: 28px;
}

.brand-content {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.logo-wrap {
    min-width: 280px;
}

.brand-logo {
    width: 100%;
    max-width: 300px;
    object-fit: contain;
}

.brand-text-fallback {
    font-size: 58px;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--primary);
    line-height: 1;
}

.brand-divider {
    width: 5px;
    min-height: 120px;
    background: var(--primary);
    border-radius: 999px;
}

.brand-info {
    flex: 1;
    min-width: 260px;
}

.brand-info h1 {
    font-size: 2rem;
    line-height: 1.2;
    margin-bottom: 10px;
    color: #0d172b;
}

.brand-info p {
    color: #1f2d49;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 18px;
}

.contact-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 28px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.watermark {
    position: absolute;
    right: -50px;
    bottom: -110px;
    width: 520px;
    height: 520px;
    border: 90px solid rgba(35, 74, 155, 0.05);
    border-radius: 50%;
    z-index: 1;
}

.watermark::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border-top: 70px solid rgba(35, 74, 155, 0.05);
    border-right: 70px solid rgba(35, 74, 155, 0.05);
    transform: rotate(45deg);
    top: 85px;
    left: 100px;
    border-radius: 40px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(217, 227, 245, 0.95);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    padding: 34px;
    position: relative;
}

.large-card {
    max-width: 780px;
    width: 100%;
    justify-self: end;
}

.login-card {
    max-width: 520px;
    width: 100%;
}

.card-header {
    margin-bottom: 26px;
}

.mini-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 14px;
}

.card-header h2 {
    font-size: 2rem;
    line-height: 1.2;
    color: #10203f;
    margin-bottom: 8px;
}

.card-header p {
    color: var(--muted);
    font-size: 0.98rem;
    line-height: 1.6;
}

.auth-form {
    width: 100%;
}

.form-grid {
    display: grid;
    gap: 18px;
}

.two-col {
    grid-template-columns: repeat(2, 1fr);
}

.full-width {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1b2c4a;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 0.97rem;
    color: var(--text);
    background: #fff;
    outline: none;
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca8bc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(47, 95, 199, 0.12);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
    min-height: 90px;
}

.password-wrap {
    position: relative;
}

.password-wrap input {
    padding-right: 78px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 10px;
    transition: var(--transition);
}

.toggle-password:hover {
    background: rgba(35, 74, 155, 0.08);
}

.extra-row,
.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.extra-row {
    margin-top: 16px;
}

.form-footer {
    margin-top: 24px;
}

.check-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.94rem;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border: none;
    border-radius: 14px;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 12px 24px rgba(35, 74, 155, 0.18);
}
.btn-dismiss {
    border: none;
    border-radius: 14px;
    padding: 13px 20px;
    font-size: 0.96rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    background: linear-gradient(135deg, #fbe9eb, #fff1f2);
    color: #c92a2a;
    border: 1px solid #f5c2c7;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 22px rgba(201, 42, 42, 0.10);
}

.btn-dismiss:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #f8d7da, #ffe3e6);
    color: #a61e1e;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 28px rgba(35, 74, 155, 0.24);
}

.text-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.text-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

@media (max-width: 1200px) {
    .auth-wrapper,
    .register-layout,
    .login-layout {
        grid-template-columns: 1fr;
    }

    .brand-panel,
    .compact-brand {
        min-height: auto;
    }

    .large-card,
    .login-card {
        max-width: 100%;
        justify-self: stretch;
    }
}

@media (max-width: 768px) {
    .auth-wrapper {
        padding: 20px;
        gap: 20px;
    }

    .auth-card,
    .brand-panel {
        padding: 22px;
        border-radius: 22px;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .brand-content {
        gap: 18px;
    }

    .brand-divider {
        width: 100%;
        min-height: 4px;
    }

    .brand-text-fallback {
        font-size: 40px;
    }

    .brand-info h1 {
        font-size: 1.55rem;
    }

    .card-header h2 {
        font-size: 1.65rem;
    }

    .watermark {
        width: 320px;
        height: 320px;
        border-width: 55px;
        right: -70px;
        bottom: -90px;
    }

    .watermark::before {
        width: 160px;
        height: 160px;
        border-top-width: 42px;
        border-right-width: 42px;
        top: 55px;
        left: 55px;
    }
}
.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-weight: 600;
    line-height: 1.6;
}

.alert.success {
    background: #ebfff1;
    color: #1f7a3f;
    border: 1px solid #bde6ca;
}

.alert.error {
    background: #fff1f1;
    color: #b03a3a;
    border: 1px solid #f0c1c1;
}
.match-message {
    display: block;
    margin-top: 8px;
    font-size: 0.88rem;
    font-weight: 600;
}

.match-message.success {
    color: #1f7a3f;
}

.match-message.error {
    color: #b03a3a;
}
.alert {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    font-weight: 600;
    line-height: 1.6;
}

.alert.success {
    background: #ebfff1;
    color: #1f7a3f;
    border: 1px solid #bde6ca;
}

.alert.error {
    background: #fff1f1;
    color: #b03a3a;
    border: 1px solid #f0c1c1;
}
.login-switch {
    display: flex;
    justify-content: center;
    margin-bottom: 22px;
}

.switch-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 250px;
    background: linear-gradient(135deg, #234a9b, #3f72da);
    border-radius: 999px;
    padding: 6px;
    overflow: hidden;
}

.switch-option {
    flex: 1;
    text-align: center;
    padding: 11px 0;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.96rem;
    color: #ffffff;
    z-index: 2;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.switch-option.active {
    color: #234a9b;
}

.switch-slider {
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: #ffffff;
    border-radius: 999px;
    z-index: 1;
    transition: all 0.3s ease;
}

.switch-slider.admin {
    left: calc(50% + 0px);
}
.switch-option:hover {
    opacity: 0.9;
}
button.switch-option {
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    outline: none;
}

.overflow-hidden-card {
    overflow: hidden;
}

.form-slider-window {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.form-slider {
    display: flex;
    width: 200%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-item {
    width: 50%;
    flex-shrink: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.form-slider.slide-admin {
    transform: translateX(-50%);
}

.form-slider:not(.slide-admin) .client-slide {
    opacity: 1;
    transform: scale(1);
}
.form-slider:not(.slide-admin) .admin-slide {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
}

.form-slider.slide-admin .client-slide {
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
}
.form-slider.slide-admin .admin-slide {
    opacity: 1;
    transform: scale(1);
}
/* =========================
   CLIENT DASHBOARD / PORTAL
========================= */

.client-page {
    font-family: 'Inter', "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: radial-gradient(circle at top left, rgba(35, 74, 155, 0.08), transparent 35%),
                linear-gradient(135deg, #f7faff, #eef4ff 45%, #f8fbff);
    color: #10203f;
}

.client-page * {
    font-family: 'Inter', "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.dashboard-shell {
    height: 100vh;
    overflow: hidden;
    display: grid;
    grid-template-columns: 240px 1fr;
}

.sidebar {
    background: linear-gradient(180deg, #16397f, #234a9b);
    color: white;
    padding: 20px 14px;
    box-shadow: 0 10px 30px rgba(24, 56, 126, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 1.4rem;
    font-weight: 800;
}

.sidebar-brand h2 {
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 2px;
}

.sidebar-brand p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.82);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-nav a {
    position: relative;
    color: rgba(255,255,255,0.92);
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.28s ease;
    font-size: 0.9rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.notif-badge {
    position: absolute;
    top: 10px;
    right: 14px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e03131;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
}

.main-content {
    padding: 16px;
    height: 100vh;
    overflow-y: auto;
}

.topbar {
    background: rgba(255,255,255,0.92);
    border: 1px solid #d9e3f5;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(24, 56, 126, 0.08);
    padding: 18px 24px;
    margin-bottom: 20px;
}

.topbar h1 {
    font-size: 1.6rem;
    line-height: 1.2;
    color: #10203f;
    margin-bottom: 6px;
}

.topbar p {
    color: #6e7c96;
    font-size: 0.95rem;
}

.reminder-card {
    background: linear-gradient(135deg, #fff8e8, #fffdf4);
    border: 1px solid #f3df9d;
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 10px 30px rgba(24, 56, 126, 0.06);
}

.reminder-card h3 {
    font-size: 1.2rem;
    color: #7d6512;
    margin: 10px 0 8px;
}

.reminder-card p {
    color: #8a7320;
    line-height: 1.7;
}

.reminder-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    background: #fff1c2;
    color: #8a6b00;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 18px;
}

.info-card {
    background: rgba(255,255,255,0.92);
    border: 1px solid #d9e3f5;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(24, 56, 126, 0.08);
    padding: 22px;
}

.info-card h3 {
    font-size: 1.15rem;
    color: #10203f;
    margin-bottom: 14px;
}

.info-card p {
    color: #6e7c96;
    line-height: 1.6;
    font-size: 0.95rem;
}

.info-card strong {
    color: #50617e;
}

@media (max-width: 992px) {
    .dashboard-shell {
        grid-template-columns: 1fr !important;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   MOBILE RESPONSIVE (≤ 768px) — Admin Portal
============================================================ */
@media (max-width: 768px) {
    /* Layout: full width, sidebar is fixed overlay */
    .dashboard-shell,
    .dashboard-container {
        grid-template-columns: 1fr !important;
    }

    /* Main content */
    .main-content {
        padding: 14px 14px 28px !important;
        min-width: 0;
    }

    /* Topbar: left padding for hamburger button clearance */
    .topbar {
        padding-left: 68px !important;
        margin-bottom: 16px;
    }

    .topbar-head {
        flex-wrap: wrap;
        gap: 10px;
    }

    .topbar h1 {
        font-size: 1.35rem !important;
    }

    .topbar p {
        font-size: 0.85rem;
    }

    /* Tables: horizontal scroll */
    .table-responsive,
    .equipment-table-wrapper,
    .equipment-scroll-container {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 560px;
    }

    /* Cards */
    .reminder-card,
    .info-card {
        padding: 18px;
    }

    /* Two-column project overview collapses */
    .project-columns {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .project-column:first-child {
        border-right: none !important;
        padding-right: 0 !important;
        border-bottom: 1.5px solid #eef3fc;
        padding-bottom: 14px !important;
    }

    /* Company info columns */
    .company-info-columns {
        flex-direction: column !important;
    }

    /* Stat cards grid */
    .stats-grid,
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    /* Form grids */
    .edit-grid {
        grid-template-columns: 1fr !important;
    }
}
.password-generate-wrap {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.password-generate-wrap input {
    flex: 1;
}

.btn-generate {
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #234a9b, #2f5fc7);
    color: #fff;
    font-weight: 700;
    padding: 0 18px;
    cursor: pointer;
    min-width: 110px;
    box-shadow: 0 10px 24px rgba(47, 95, 199, 0.18);
    transition: transform 0.18s ease, opacity 0.18s ease;
}

.btn-generate:hover {
    transform: translateY(-1px);
    opacity: 0.96;
}
