:root {
    --bg-color: #f4f6fb;
    --text-color: #1a1a2e;
    --card-bg: #ffffff;
    --primary-color: #4361ee;
    --primary-hover: #3f37c9;
    --secondary-bg: #eef2fa;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

/* Base Wrapper */
.portal-wrapper {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-top: 40px;
}

/* Header */
.portal-header {
    text-align: center;
    position: relative;
    animation: fadeInDown 0.8s ease-out;
}

.logo-container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.logo-placeholder {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #4cc9f0);
    color: white;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.2);
    transform: rotate(-5deg);
}

.portal-header h1 {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 5px;
    background: linear-gradient(to right, var(--primary-color), #3f37c9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.portal-header p {
    font-size: 1.2rem;
    color: #6c757d;
    font-weight: 500;
}

.admin-access {
    position: absolute;
    top: 0;
    right: 0;
}

.btn-admin {
    background: white;
    color: var(--text-color);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-admin:hover {
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    color: var(--primary-color);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 200px;
    gap: 24px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.bento-item {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 30px;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 15px 35px rgba(0,0,0,0.03);
    position: relative;
    overflow: hidden;
}

/* Glassmorphism subtle effect */
.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.0) 100%);
    pointer-events: none;
    border-radius: 24px;
    z-index: 1;
}

.bento-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 45px rgba(67, 97, 238, 0.1);
    border-color: rgba(67, 97, 238, 0.2);
}

.bento-item .icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: inline-block;
    transition: var(--transition);
    z-index: 2;
    position: relative;
}

.bento-item:hover .icon {
    transform: scale(1.1) rotate(5deg);
}

.bento-item .content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 2;
    position: relative;
}

.bento-item h3 {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    max-width: 80%;
}

.bento-item .arrow {
    background: var(--secondary-bg);
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    font-weight: bold;
    color: var(--primary-color);
    transition: var(--transition);
}

.bento-item:hover .arrow {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px) rotate(-45deg);
}

/* Spans logic for larger screens */
@media (min-width: 768px) {
    .span-2 {
        grid-column: span 2;
    }
    .row-span-2 {
        grid-row: span 2;
    }
}

.empty-state {
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: rgba(255,255,255,0.5);
    border: 2px dashed rgba(0,0,0,0.1);
    box-shadow: none;
}
.empty-state h3 { max-width: 100%; margin-bottom: 10px; }

/* Footer */
.portal-footer {
    text-align: center;
    margin-top: 20px;
    padding-bottom: 40px;
    color: #a0aabf;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .admin-access {
        position: relative;
        margin-top: 20px;
        display: flex;
        justify-content: center;
    }
    .portal-header h1 {
        font-size: 2.2rem;
    }
    .bento-item h3 {
        font-size: 1.2rem;
    }
}
