:root {
    --app-bg: #f7f7fb;
    --card-radius: 16px;
    --primary: #4361ee;
    --primary-light: #e8edff;
    --secondary: #6c757d;
    --success: #06d6a0;
    --warning: #ffd166;
    --danger: #ef476f;
    --dark: #1e1e2c;
    --light: #f8f9fa;
}

body {
    background: var(--app-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    padding-bottom: env(safe-area-inset-bottom);
}

/* App header */
.app-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .logo-wrap img {
        width: 52px;
        height: 52px;
        object-fit: contain;
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0,0,0,.12);
        padding: 4px;
        background: white;
    }

/* Cards */
.app-card {
    border: none;
    border-radius: var(--card-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .app-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0,0,0,.1);
    }

    .app-card .icon {
        width: 48px;
        height: 48px;
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: var(--primary-light);
        color: var(--primary);
        font-size: 1.2rem;
    }

/* Bottom bar */
.app-tabbar {
    height: 70px;
    padding-bottom: env(safe-area-inset-bottom);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -5px 20px rgba(0,0,0,.08);
    background: #fff;
}

    .app-tabbar .nav-link {
        font-size: 12px;
        color: #667085;
        transition: color 0.2s ease;
        padding: 8px 0;
    }

        .app-tabbar .nav-link.active {
            color: var(--primary);
        }

        .app-tabbar .nav-link i {
            font-size: 1.3rem;
            margin-bottom: 4px;
        }

/* Floating action button */
.fab {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 6px 20px rgba(13,110,253,.4);
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .fab:hover {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(13,110,253,.5);
    }

/* Helpful spacing under fixed tabbar */
.app-bottom-space {
    height: 90px;
}

/* Demo avatar */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary);
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,.1);
}

/* Notification badge */
.badge-notification {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

/* Search bar */
.search-container {
    position: relative;
}

    .search-container .input-group-text {
        background: #fff;
        border-right: none;
        border-top-left-radius: 12px;
        border-bottom-left-radius: 12px;
    }

    .search-container .form-control {
        border-left: none;
        border-top-right-radius: 12px;
        border-bottom-right-radius: 12px;
        padding-left: 0;
    }

        .search-container .form-control:focus {
            box-shadow: none;
            border-color: #ced4da;
        }

/* Next class card */
.next-class-card {
    background: linear-gradient(135deg, var(--primary) 0%, #6a7eff 100%);
    color: white;
    overflow: hidden;
    position: relative;
}

    .next-class-card::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 100%;
        height: 100%;
        background: rgba(255,255,255,0.1);
        transform: rotate(25deg);
    }

/* Announcements */
.announcement-item {
    border: none;
    border-radius: 12px;
    margin-bottom: 10px;
    transition: transform 0.2s ease;
}

    .announcement-item:hover {
        transform: translateX(5px);
    }

.announcement-icon {
    background: var(--primary-light);
    color: var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Progress bar */
.progress {
    height: 6px;
    border-radius: 3px;
}

/* Section titles */
.section-title {
    position: relative;
    padding-left: 15px;
}

    .section-title::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 6px;
        height: 18px;
        background: var(--primary);
        border-radius: 3px;
    }

/* Custom button */
.btn-app {
    border-radius: 12px;
    padding: 8px 16px;
    font-weight: 500;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* School name styling */
.portal-title {
    font-weight: 700;
    font-size: 1.5rem;
    color: #1a1a1a;
    line-height: 1.2;
}

.portal-subtitle {
    font-size: 0.85rem;
    color: var(--secondary);
    letter-spacing: 0.5px;
}

/* Logo container */
.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Improved logo styling */
.logo-img {
    width: 50%;
    height: 54px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background: white;
    padding: 5px;
}

/* Header text container */
.header-text {
    display: flex;
    flex-direction: column;
}
