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

:root {
    --primary: #5e54db;
    --primary-dark: #4d45c4;
    --primary-light: #7a71ed;
    --secondary: #00d4ff;
    --success: #0ecb81;
    --danger: #ff4757;
    --warning: #ffa502;
    --info: #00d4ff;
    --creative: #ff006e;
    --finance: #06d6a0;
    --president: #7209b7;
    --background: #0a0e27;
    --background-alt: #12172c;
    --surface: #1a2042;
    --surface-light: #252e4a;
    --surface-lighter: #2d3857;
    --text: #f5f7ff;
    --text-secondary: #a8b2d1;
    --text-tertiary: #7a8ab5;
    --border: #373f5f;
    --border-light: #454f6f;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, var(--background-alt) 100%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    letter-spacing: 0.3px;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    animation: fadeIn 0.4s ease-out;
}

.screen.active {
    display: block;
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* User Selection Screen */
.selection-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, var(--background) 0%, var(--background-alt) 100%);
}

.main-title {
    font-size: 3.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -1px;
}

.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    width: 100%;
}

.user-card {
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.user-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.user-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(94, 84, 219, 0.3);
}

.user-card:hover::before {
    opacity: 0.08;
}

.user-card > * {
    position: relative;
    z-index: 1;
}

.user-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-lighter);
    border: 3px solid var(--border);
    box-shadow: var(--shadow-md);
}

.user-avatar svg {
    width: 60px;
    height: 60px;
}

.user-avatar.creative {
    background: linear-gradient(135deg, var(--creative), #ff3b8f);
    border-color: var(--creative);
}

.user-avatar.finance {
    background: linear-gradient(135deg, var(--finance), #00e8a8);
    border-color: var(--finance);
}

.user-avatar.president {
    background: linear-gradient(135deg, var(--president), #b722d9);
    border-color: var(--president);
}

.user-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
    color: var(--text);
    font-weight: 700;
}

.user-card p {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.role-badge {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.creative-badge {
    background: linear-gradient(135deg, rgba(255, 0, 110, 0.15), rgba(255, 59, 143, 0.15));
    color: #ff6fa0;
    border: 1px solid rgba(255, 0, 110, 0.3);
}

.finance-badge {
    background: linear-gradient(135deg, rgba(14, 203, 129, 0.15), rgba(0, 232, 168, 0.15));
    color: #5eead4;
    border: 1px solid rgba(14, 203, 129, 0.3);
}

.president-badge {
    background: linear-gradient(135deg, rgba(114, 9, 183, 0.15), rgba(183, 34, 217, 0.15));
    color: #c4a9ff;
    border: 1px solid rgba(114, 9, 183, 0.3);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    padding: 2.5rem;
    border-radius: 25px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--border);
}

.modal-content h2 {
    margin-bottom: 0.5rem;
    color: var(--text);
    font-size: 1.6rem;
    font-weight: 700;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 1.8rem;
    font-size: 0.95rem;
}

.modal-content input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--surface-lighter);
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 1.2rem;
    transition: var(--transition);
    font-family: inherit;
}

.modal-content input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(94, 84, 219, 0.1);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
}

.modal-buttons button {
    flex: 1;
}

.error-message {
    color: var(--danger);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
    padding: 0.75rem;
    background: rgba(255, 71, 87, 0.1);
    border-radius: 8px;
    border-left: 3px solid var(--danger);
}

.error-message.show {
    display: block;
}

/* Portal Layouts */
.navbar {
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    border-bottom: 2px solid var(--border);
    padding: 1.2rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.notification-area {
    position: relative;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.6rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.btn-icon:hover {
    background: var(--surface-lighter);
    color: var(--text);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

.navbar h2 {
    font-size: 1.6rem;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.5px;
}

.portal-content {
    padding: 2.5rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .portal-content {
        padding: 1.5rem 1rem;
    }
    
    .navbar {
        padding: 1rem;
    }
    
    .navbar h2 {
        font-size: 1.3rem;
    }
}

/* Action Selection Grid */
.action-selection-grid {
    display: none; /* Hidden by default */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2.5rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.action-selection-grid.active {
    display: grid; /* Show when active */
    animation: fadeIn 0.4s ease-out;
}

.action-card {
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.action-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    box-shadow: 0 20px 50px rgba(94, 84, 219, 0.3);
}

.action-card:hover::before {
    opacity: 0.08;
}

.action-card > * {
    position: relative;
    z-index: 1;
}

.action-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-lighter);
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-md);
}

.action-icon svg {
    width: 40px;
    height: 40px;
    color: var(--primary);
}

.action-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

/* Cards */
.card {
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    border-radius: 18px;
    padding: 2rem;
    border: 2px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: 0 10px 35px rgba(94, 84, 219, 0.15);
}

.card:hover::before {
    transform: scaleX(1);
}

.card.full-width {
    grid-column: 1 / -1;
}

.card h3 {
    margin-bottom: 1.5rem;
    color: var(--text);
    font-size: 1.3rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.card h4 {
    color: var(--text);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

/* Buttons */
button {
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(94, 84, 219, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(94, 84, 219, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--surface-lighter);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    border-color: var(--primary);
}

.btn-logout {
    background: rgba(255, 71, 87, 0.15);
    color: #ff7a8a;
    border: 2px solid rgba(255, 71, 87, 0.3);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.btn-logout:hover {
    background: rgba(255, 71, 87, 0.25);
    border-color: var(--danger);
}

.btn-upvote {
    background: linear-gradient(135deg, rgba(14, 203, 129, 0.2), rgba(0, 232, 168, 0.2));
    color: #5eead4;
    border: 2px solid rgba(14, 203, 129, 0.4);
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

.btn-upvote:hover {
    background: linear-gradient(135deg, rgba(14, 203, 129, 0.3), rgba(0, 232, 168, 0.3));
    border-color: var(--success);
}

.btn-downvote {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.2), rgba(255, 107, 128, 0.2));
    color: #ff8a9a;
    border: 2px solid rgba(255, 71, 87, 0.4);
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

.btn-downvote:hover {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.3), rgba(255, 107, 128, 0.3));
    border-color: var(--danger);
}

.btn-shortlist {
    background: linear-gradient(135deg, var(--warning), #ffb84d);
    color: white;
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

.btn-shortlist:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 165, 2, 0.3);
}

.btn-approve {
    background: linear-gradient(135deg, var(--success), #00e8a8);
    color: white;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.btn-approve:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(14, 203, 129, 0.3);
}

.btn-reject {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.2), rgba(255, 107, 128, 0.2));
    color: #ff8a9a;
    border: 2px solid rgba(255, 71, 87, 0.4);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
}

.btn-reject:hover {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.3), rgba(255, 107, 128, 0.3));
}

/* Input Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.input-group input,
.input-group textarea,
.input-group select {
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--surface-lighter);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: var(--transition);
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface-light);
    box-shadow: 0 0 0 3px rgba(94, 84, 219, 0.1);
}

.input-group textarea {
    min-height: 110px;
    resize: vertical;
    font-family: inherit;
}

.input-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a8b2d1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Status Info */
.status-info p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-info strong {
    color: var(--text);
    font-weight: 600;
}

/* Financial Stats */
.financial-stats {
    display: grid;
    gap: 1.2rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface-lighter) 100%);
    border-radius: 14px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.stat-item:hover {
    border-color: var(--primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-value {
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Salary Breakdown */
.salary-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.salary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface-lighter) 100%);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.salary-item:hover {
    border-color: var(--primary);
}

.salary-item.total {
    background: linear-gradient(135deg, rgba(94, 84, 219, 0.1), rgba(0, 212, 255, 0.1));
    border: 2px solid var(--primary);
    font-weight: 700;
}

.salary-item strong {
    color: var(--text);
}

.salary-item span {
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
}

/* Voting List */
.voting-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.vote-item {
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface-lighter) 100%);
    padding: 1.3rem;
    border-radius: 14px;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.vote-item:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(94, 84, 219, 0.1);
}

.vote-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.vote-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.vote-score {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface-lighter) 100%);
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid var(--border);
}

.vote-score.positive {
    color: var(--success);
    border-color: rgba(14, 203, 129, 0.3);
}

.vote-score.negative {
    color: var(--danger);
    border-color: rgba(255, 71, 87, 0.3);
}

.vote-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.vote-buttons {
    display: flex;
    gap: 0.6rem;
}

.vote-buttons button {
    flex: 1;
    padding: 0.6rem;
    font-size: 0.85rem;
}

/* Transaction List */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    max-height: 550px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface-lighter) 100%);
    border-radius: 12px;
    border-left: 4px solid var(--border);
    transition: var(--transition);
}

.transaction-item.income {
    border-left-color: var(--success);
}

.transaction-item.income:hover {
    box-shadow: 0 5px 15px rgba(14, 203, 129, 0.15);
}

.transaction-item.expense {
    border-left-color: var(--danger);
}

.transaction-item.expense:hover {
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.15);
}

.transaction-item strong {
    color: var(--text);
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.transaction-item p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.transaction-item small {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

.transaction-item .amount {
    font-size: 1.3rem;
    font-weight: 700;
    text-align: right;
}

.transaction-item.income .amount {
    color: var(--success);
}

.transaction-item.expense .amount {
    color: var(--danger);
}

/* Assets List */
.assets-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.asset-item {
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface-lighter) 100%);
    padding: 1.3rem;
    border-radius: 14px;
    border: 2px solid var(--border);
    transition: var(--transition);
}

.asset-item:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(94, 84, 219, 0.1);
}

.asset-item h4 {
    color: var(--text);
    margin-bottom: 0.6rem;
    font-weight: 700;
}

.asset-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.9rem;
    line-height: 1.5;
}

.asset-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.asset-item a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.asset-item small {
    color: var(--text-tertiary);
    font-size: 0.8rem;
}

/* Setup Progress */
.setup-progress {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.progress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface-lighter) 100%);
    border-radius: 14px;
    border: 1px solid var(--border);
}

.status-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.complete {
    background: linear-gradient(135deg, rgba(14, 203, 129, 0.15), rgba(0, 232, 168, 0.15));
    color: #5eead4;
    border: 1px solid rgba(14, 203, 129, 0.3);
}

.status-badge.pending {
    background: linear-gradient(135deg, rgba(255, 165, 2, 0.15), rgba(255, 180, 77, 0.15));
    color: #ffb84d;
    border: 1px solid rgba(255, 165, 2, 0.3);
}

.status-badge.pending-approval {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(122, 113, 237, 0.15));
    color: #87cceb;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.status-badge.approved {
    background: linear-gradient(135deg, rgba(14, 203, 129, 0.15), rgba(0, 232, 168, 0.15));
    color: #5eead4;
    border: 1px solid rgba(14, 203, 129, 0.3);
}

.status-badge.rejected {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.15), rgba(255, 107, 128, 0.15));
    color: #ff8a9a;
    border: 1px solid rgba(255, 71, 87, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    color: var(--text-secondary);
    padding: 3rem 2rem;
    font-style: italic;
    opacity: 0.7;
}

/* Floating Chat */
.chat-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    box-shadow: 0 8px 25px rgba(94, 84, 219, 0.35);
    transition: var(--transition);
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(94, 84, 219, 0.45);
}

.chat-toggle svg {
    width: 32px;
    height: 32px;
}

.floating-chat-window {
    position: fixed;
    bottom: 7.5rem;
    right: 2rem;
    width: 420px;
    max-width: 90vw;
    height: 550px;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    border: 2px solid var(--border);
    border-radius: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-chat-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 2px solid var(--border);
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    border-radius: 18px 18px 0 0;
}

.chat-header h3 {
    margin-bottom: 0;
    border: none;
    padding: 0;
    font-size: 1.2rem;
    font-weight: 700;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    background: var(--background-alt);
}

.message {
    padding: 0.85rem 1.1rem;
    border-radius: 16px;
    max-width: 85%;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    word-wrap: break-word;
    animation: slideInRight 0.3s ease-out;
}

.message .sender {
    font-weight: 700;
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message .text {
    font-size: 0.95rem;
    word-wrap: break-word;
}

.message .timestamp {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 0.4rem;
    text-align: right;
}

.message.sent {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message.received {
    background: var(--surface-lighter);
    border: 1px solid var(--border);
    color: var(--text);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.message .mention {
    background: rgba(255, 165, 2, 0.25);
    color: #ffb84d;
    padding: 0.15rem 0.4rem;
    border-radius: 5px;
    font-weight: 700;
}

.message .ping-notification {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.15), rgba(255, 107, 128, 0.15));
    color: #ff8a9a;
    padding: 0.15rem 0.4rem;
    border-radius: 5px;
    font-weight: 700;
}

.chat-input {
    display: flex;
    gap: 0.75rem;
    padding: 1.2rem;
    border-top: 2px solid var(--border);
    background: var(--surface);
    border-radius: 0 0 18px 18px;
}

.chat-input input {
    flex-grow: 1;
}

.chat-input button {
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

/* Spend Requests */
.spend-requests-list {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.spend-request-item {
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface-lighter) 100%);
    padding: 1.5rem;
    border-radius: 14px;
    border-left: 4px solid var(--warning);
    transition: var(--transition);
}

.spend-request-item:hover {
    box-shadow: 0 8px 25px rgba(255, 165, 2, 0.15);
}

.spend-request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.spend-request-header .amount {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--warning);
}

.spend-request-reason {
    color: var(--text);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.spend-request-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.approvals-section {
    margin-bottom: 1.5rem;
}

.approvals-section strong {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.approver-list {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.approver-pill {
    background: var(--surface);
    color: var(--text);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.approver-pill.approved {
    background: linear-gradient(135deg, rgba(14, 203, 129, 0.15), rgba(0, 232, 168, 0.15));
    color: #5eead4;
    border-color: rgba(14, 203, 129, 0.3);
}

.approver-pill.approved::before {
    content: '✓';
    font-weight: 700;
}

.approver-pill.pending {
    background: linear-gradient(135deg, rgba(255, 165, 2, 0.15), rgba(255, 180, 77, 0.15));
    color: #ffb84d;
    border-color: rgba(255, 165, 2, 0.3);
}

.approver-pill.rejected {
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.15), rgba(255, 107, 128, 0.15));
    color: #ff8a9a;
    border-color: rgba(255, 71, 87, 0.3);
}

.approver-pill.rejected::before {
    content: '✗';
    font-weight: 700;
}

.spend-request-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.spend-request-actions button {
    flex: 1;
    min-width: 120px;
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
}

/* Helpful Tools */
.tool-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface-lighter) 100%);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text);
    transition: var(--transition);
    border: 2px solid var(--border);
}

.tool-item:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 20px rgba(94, 84, 219, 0.1);
}

.tool-item strong {
    color: var(--text);
    font-weight: 700;
    display: block;
}

.tool-item span {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: block;
}

/* Notification Center */
.notification-center {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    max-width: 350px;
    z-index: 999;
}

.notification {
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
    display: flex;
    gap: 1rem;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.info {
    border-left: 4px solid var(--info);
}

.notification.warning {
    border-left: 4px solid var(--warning);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notification-content {
    flex-grow: 1;
}

.notification-title {
    color: var(--text);
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.notification-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    font-size: 1.5rem;
    transition: var(--transition);
}

.notification-close:hover {
    color: var(--text);
}

@media (max-width: 640px) {
    .notification-center {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
    border: 2px solid var(--surface);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--danger), #ff6b7a);
    border-radius: 50%;
    border: 3px solid var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.5);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(255, 71, 87, 0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }

    .user-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .navbar {
        padding: 1rem;
    }

    .navbar h2 {
        font-size: 1.2rem;
    }

    .portal-content {
        padding: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .floating-chat-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 70vh;
        border-radius: 20px 20px 0 0;
    }

    .chat-toggle {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 55px;
        height: 55px;
    }

    button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .input-group input,
    .input-group textarea {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }

    .vote-buttons button {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .spend-request-actions button {
        min-width: 100px;
    }

    .vote-item {
        padding: 1rem;
    }

    .transaction-item {
        padding: 1rem;
    }

    .transaction-item .amount {
        font-size: 1.1rem;
    }

    .stat-item {
        padding: 1rem;
    }

    .salary-item {
        padding: 0.85rem;
    }

    .modal-content {
        padding: 1.75rem;
        max-width: 85%;
    }

    .selection-container {
        padding: 1rem;
    }

    .nav-content {
        flex-direction: column;
        gap: 1rem;
    }

    .action-selection-grid {
        padding: 1.5rem 1rem;
    }

    .d-flex {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .user-card {
        padding: 1.5rem 1rem;
    }

    .card {
        padding: 1.25rem;
        margin-bottom: 0.5rem;
    }

    .card h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .dashboard-grid {
        gap: 1rem;
    }

    .floating-chat-window {
        height: 80vh;
    }

    .chat-toggle {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
    }

    .vote-item {
        padding: 0.85rem;
    }

    .spend-request-item {
        padding: 1.2rem;
    }

    .button {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .card h3 {
        padding-bottom: 0.75rem;
    }

    .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .stat-label {
        width: 100%;
    }

    .stat-value {
        width: 100%;
        text-align: right;
    }

    .vote-buttons {
        flex-direction: column;
    }

    .vote-buttons button {
        width: 100%;
    }

    .spend-request-actions {
        flex-direction: column;
    }

    .spend-request-actions button {
        width: 100%;
    }

    .approver-list {
        flex-direction: column;
    }

    .approver-pill {
        width: 100%;
    }
}

/* Back Button */
.btn-back {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    margin-bottom: 2rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-back:hover {
    background: var(--surface-lighter);
    color: var(--text);
    border-color: var(--border-light);
}
/* Portal Sections */
.portal-section {
    display: none; /* Hidden by default */
    animation: fadeIn 0.4s ease-out;
}

.portal-section.active {
    display: block; /* Show when active */
}
.spend-request-item.approved {
    border-left-color: var(--success);
}

.spend-request-item.rejected {
    border-left-color: var(--danger);
}



/* To-Do List */
.todo-list-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px; /* For scrollbar */
}

.todo-item {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface-lighter) 100%);
    padding: 1rem 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: var(--transition);
}

.todo-item:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(94, 84, 219, 0.1);
}

.todo-item-text {
    flex-grow: 1;
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    padding-right: 1rem;
}

.todo-item.completed .todo-item-text {
    text-decoration: line-through;
    color: var(--text-secondary);
    opacity: 0.7;
}

.todo-item-meta {
    margin-right: 1rem;
}

.btn-todo-delete {
    color: var(--danger);
}

/* Admin Voting */
.admin-voting .vote-item {
    border: 2px solid var(--border);
}

.admin-voting .vote-item:hover {
    border-color: var(--primary);
}

/* Utility Classes */
.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-sm {
    gap: 0.5rem;
}

.gap-md {
    gap: 1rem;
}

.gap-lg {
    gap: 1.5rem;
}

/* Loading Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Fade Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}
