
/* ==========================================================================
   IHTIMAM STUDENT PORTAL - PREMIUM 3D INSTITUTIONAL DASHBOARD
   ========================================================================== */

:root {
    --iht-navy-dark: #0B192C;
    --iht-navy-light: #1E293B;
    --iht-green: #0B7C46;
    --iht-green-light: #10B981;
    --iht-green-bg: #ecfdf5;
    --iht-green-border: #a7f3d0;
    --iht-gold: #d97706;
    --iht-red: #dc2626;
    --iht-bg-gray: #f8fafc;
    --iht-border: #e2e8f0;
    --iht-card-shadow: 0 10px 30px rgba(11, 25, 44, 0.07), 0 1px 3px rgba(0, 0, 0, 0.03);
    --iht-card-hover-shadow: 0 16px 36px rgba(11, 25, 44, 0.11), 0 2px 6px rgba(0, 0, 0, 0.04);
}

.ihtimam-portal-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: var(--iht-navy-dark);
    max-width: 1140px;
    margin: 24px auto;
    padding: 0 16px;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.ihtimam-portal-root * {
    box-sizing: border-box;
}

/* ================= 1. COMPACT 3D PORTAL HEADER ================= */
.iht-header-card {
    background: #ffffff;
    border: 1px solid var(--iht-border);
    border-radius: 18px;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    box-shadow: var(--iht-card-shadow);
    position: relative;
    overflow: hidden;
}
.iht-header-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3.5px;
    background: linear-gradient(90deg, var(--iht-green) 0%, var(--iht-green-light) 50%, var(--iht-navy-dark) 100%);
}
.iht-header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.iht-header-logo {
    max-height: 46px !important;
    max-width: 140px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
    flex-shrink: 0;
}
.iht-header-title-block h1 {
    font-size: 18px;
    font-weight: 900;
    margin: 0;
    color: var(--iht-navy-dark);
    letter-spacing: 0.5px;
    line-height: 1.15;
}
.iht-header-title-block span {
    font-size: 11.5px;
    color: var(--iht-green);
    font-weight: 700;
    display: block;
    margin-top: 2px;
    letter-spacing: 0.2px;
}

.iht-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.iht-user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--iht-bg-gray);
    border: 1px solid var(--iht-border);
    border-radius: 12px;
    padding: 6px 14px 6px 8px;
}
.iht-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--iht-navy-dark) 0%, #1e3a5f 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    box-shadow: 0 3px 8px rgba(11, 25, 44, 0.2);
}
.iht-user-meta {
    display: flex;
    flex-direction: column;
}
.iht-user-name {
    font-size: 13.5px;
    font-weight: 800;
    color: var(--iht-navy-dark);
    line-height: 1.2;
}
.iht-user-sub {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-top: 2px;
}
.iht-user-sub code {
    color: var(--iht-green);
    font-family: inherit;
    font-weight: 800;
}
.iht-btn-logout {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 8px 16px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.iht-btn-logout:hover {
    background: #fee2e2;
    color: #991b1b;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(185, 28, 28, 0.15);
}

/* ================= 2. PREMIUM 3D NAVIGATION BAR ================= */
.iht-nav-container {
    background: linear-gradient(135deg, var(--iht-navy-dark) 0%, #152238 100%);
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(11, 25, 44, 0.12);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.iht-nav-link {
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    color: #cbd5e1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.iht-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateY(-1px);
}
.iht-nav-link.active {
    background: linear-gradient(135deg, var(--iht-green) 0%, #056434 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(11, 124, 70, 0.4);
}

/* ================= 3. 3D CARD CONTAINERS ================= */
.iht-card {
    background: #ffffff;
    border: 1px solid var(--iht-border);
    border-radius: 18px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: var(--iht-card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.iht-card:hover {
    box-shadow: var(--iht-card-hover-shadow);
}
.iht-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1.5px solid #f1f5f9;
}
.iht-card-title {
    font-size: 16.5px;
    font-weight: 800;
    color: var(--iht-navy-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 3D Dashboard Multi-Grid */
.iht-grid-2col {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 22px;
}
.iht-grid-equal-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.iht-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}
.iht-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

/* ================= 4. RAISED 3D STATISTIC CARDS ================= */
.iht-stat-box {
    background: #ffffff;
    border: 1px solid var(--iht-border);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 12px rgba(11, 25, 44, 0.03);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.iht-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 25, 44, 0.07);
}
.iht-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.iht-stat-info {
    display: flex;
    flex-direction: column;
}
.iht-stat-val {
    font-size: 21px;
    font-weight: 900;
    color: var(--iht-navy-dark);
    line-height: 1.15;
}
.iht-stat-lbl {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 3px;
}

/* Progress bar in 3D */
.iht-progress-track {
    background: #f1f5f9;
    border-radius: 20px;
    height: 14px;
    width: 100%;
    overflow: hidden;
    margin: 12px 0 16px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}
.iht-progress-fill {
    background: linear-gradient(90deg, var(--iht-green) 0%, var(--iht-green-light) 100%);
    height: 100%;
    border-radius: 20px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Badges */
.iht-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.iht-badge-green {
    background: var(--iht-green-bg);
    color: var(--iht-green);
    border: 1px solid var(--iht-green-border);
}
.iht-badge-red {
    background: #fef2f2;
    color: var(--iht-red);
    border: 1px solid #fecaca;
}
.iht-badge-amber {
    background: #fffbeb;
    color: var(--iht-gold);
    border: 1px solid #fde68a;
}
.iht-badge-navy {
    background: #f1f5f9;
    color: var(--iht-navy-dark);
    border: 1px solid var(--iht-border);
}

/* ================= 5. ATTENDANCE RADIAL & HISTORY ================= */
.iht-att-hero {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 20px;
    margin-bottom: 22px;
    align-items: stretch;
}
.iht-att-gauge-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--iht-border);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(11, 25, 44, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.iht-gauge-circle-box {
    position: relative;
    width: 110px;
    height: 110px;
    margin: 0 auto 10px;
}
.iht-gauge-svg {
    transform: rotate(-90deg);
    width: 110px;
    height: 110px;
    display: block;
}
.iht-gauge-bg {
    fill: none;
    stroke: #f1f5f9;
    stroke-width: 10;
}
.iht-gauge-bar {
    fill: none;
    stroke: var(--iht-green);
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.8s ease;
}
.iht-gauge-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    font-weight: 900;
    color: var(--iht-navy-dark);
}

/* Modern Tables */
.iht-table-responsive {
    overflow-x: auto;
    border: 1px solid var(--iht-border);
    border-radius: 12px;
    background: #ffffff;
}
.iht-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    text-align: left;
}
.iht-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 800;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 13px 16px;
    border-bottom: 1.5px solid #cbd5e1;
}
.iht-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}
.iht-table tbody tr:last-child td {
    border-bottom: none;
}
.iht-table tbody tr:hover {
    background: #f8fafc;
}

/* ================= 6. PROFILE KEY-VALUE CARDS ================= */
.iht-profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
}
.iht-profile-item {
    display: flex;
    flex-direction: column;
}
.iht-profile-lbl {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}
.iht-profile-val {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--iht-navy-dark);
}

/* ================= 7. BUTTONS & ACTIONS ================= */
.iht-btn-primary {
    background: linear-gradient(135deg, var(--iht-green) 0%, #056434 100%);
    color: #ffffff !important;
    border: none;
    padding: 11px 22px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(11, 124, 70, 0.35);
    transition: all 0.2s ease;
}
.iht-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(11, 124, 70, 0.45);
}

/* ================= 8. LOGIN CARD ================= */
.iht-login-box {
    max-width: 440px;
    margin: 40px auto;
    background: #ffffff;
    border: 1px solid var(--iht-border);
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(11, 25, 44, 0.09);
    overflow: hidden;
}
.iht-login-header {
    background: linear-gradient(135deg, var(--iht-navy-dark) 0%, #152238 100%);
    padding: 28px 24px 22px;
    text-align: center;
    color: #ffffff;
    border-bottom: 3.5px solid var(--iht-green);
}
.iht-login-header img {
    max-height: 48px !important;
    max-width: 140px !important;
    margin-bottom: 12px;
    object-fit: contain !important;
    display: inline-block !important;
}
.iht-login-header h2 {
    font-size: 19px;
    font-weight: 900;
    margin: 0;
    color: #ffffff;
    letter-spacing: 0.5px;
}
.iht-login-header p {
    font-size: 12px;
    color: #cbd5e1;
    margin: 6px 0 0;
    line-height: 1.4;
}
.iht-login-body {
    padding: 28px 26px;
}
.iht-form-group {
    margin-bottom: 18px;
}
.iht-form-group label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 6px;
    color: #1e293b;
}
.iht-form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    color: var(--iht-navy-dark);
    box-sizing: border-box;
    transition: all 0.2s ease;
}
.iht-form-group input:focus {
    border-color: var(--iht-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(11, 124, 70, 0.15);
}

/* ================= 9. RESPONSIVE BREAKPOINTS ================= */
@media (max-width: 880px) {
    .iht-header-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    .iht-header-right {
        width: 100%;
        justify-content: space-between;
    }
    .iht-grid-2col {
        grid-template-columns: 1fr;
    }
    .iht-grid-4col {
        grid-template-columns: repeat(2, 1fr);
    }
    .iht-grid-3col {
        grid-template-columns: 1fr;
    }
    .iht-att-hero {
        grid-template-columns: 1fr;
    }
    .iht-profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .iht-nav-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 6px 8px;
    }
    .iht-nav-link {
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 12.5px;
    }
    .iht-grid-4col {
        grid-template-columns: 1fr;
    }
    .iht-grid-equal-2 {
        grid-template-columns: 1fr;
    }
}
