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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #F8F8F7;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.6;
}

.portal-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: 220px;
    min-height: 100vh;
    background: #ffffff;
    border-right: 0.5px solid rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0;
    z-index: 100;
}

.logo-area {
    padding: 24px 20px 20px;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
}

.logo-text { font-size: 15px; font-weight: 600; color: #1a1a1a; }
.logo-sub { font-size: 11px; color: #888; margin-top: 2px; }

.nav { flex: 1; padding: 12px 0; overflow-y: auto; }

.nav-section {
    padding: 10px 20px 4px;
    font-size: 10px;
    color: #aaa;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 20px;
    font-size: 13px;
    color: #555;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: all 0.15s;
}

.nav-item:hover { background: #F5F5F3; color: #1a1a1a; }
.nav-item.active { color: #185FA5; border-left-color: #185FA5; background: #EEF5FC; font-weight: 500; }

.user-area {
    padding: 16px 20px;
    border-top: 0.5px solid rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #EEF5FC;
    color: #185FA5;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600;
    flex-shrink: 0;
}

.avatar.small { width: 28px; height: 28px; font-size: 11px; }

.user-name { font-size: 13px; font-weight: 500; color: #1a1a1a; }
.user-email { font-size: 11px; color: #aaa; }

.main { margin-left: 220px; flex: 1; display: flex; flex-direction: column; }

.topbar {
    background: #ffffff;
    border-bottom: 0.5px solid rgba(0,0,0,0.08);
    padding: 0 32px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
}

.page-title { font-size: 15px; font-weight: 500; color: #1a1a1a; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.content { padding: 32px; }

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.metric-card {
    background: #ffffff;
    border: 0.5px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 20px;
}

.metric-label { font-size: 12px; color: #888; margin-bottom: 6px; }
.metric-value { font-size: 28px; font-weight: 500; color: #1a1a1a; }
.metric-sub { font-size: 12px; color: #aaa; margin-top: 4px; }

.card {
    background: #ffffff;
    border: 0.5px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.card-title { font-size: 14px; font-weight: 500; color: #1a1a1a; }
.card-action { font-size: 12px; color: #185FA5; text-decoration: none; cursor: pointer; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }

.progress-bar {
    height: 4px;
    background: #F0F0EE;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill { height: 100%; border-radius: 2px; background: #185FA5; }

.status-pill {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 500;
}

.status-active { background: #EAF3DE; color: #3B6D11; }
.status-pending { background: #FAEEDA; color: #854F0B; }
.status-closed { background: #F0F0EE; color: #555; }
.status-open { background: #FAEEDA; color: #854F0B; }
.status-done { background: #EAF3DE; color: #3B6D11; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    text-decoration: none;
}

.btn-primary { background: #185FA5; color: #ffffff; }
.btn-primary:hover { background: #0C447C; }
.btn-secondary { background: #F0F0EE; color: #1a1a1a; }
.btn-secondary:hover { background: #E5E5E3; }

.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 13px; font-weight: 500; color: #444; margin-bottom: 6px; }

.form-input {
    width: 100%;
    padding: 9px 12px;
    border: 0.5px solid rgba(0,0,0,0.2);
    border-radius: 8px;
    font-size: 13px;
    color: #1a1a1a;
    background: #ffffff;
    transition: border 0.15s;
    outline: none;
}

.form-input:focus { border-color: #185FA5; box-shadow: 0 0 0 3px rgba(24,95,165,0.1); }

.table { width: 100%; border-collapse: collapse; }
.table th { font-size: 12px; color: #888; font-weight: 500; padding: 8px 12px; border-bottom: 0.5px solid rgba(0,0,0,0.08); text-align: left; }
.table td { padding: 12px; border-bottom: 0.5px solid rgba(0,0,0,0.05); font-size: 13px; color: #333; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #F8F8F7; }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.alert-error { background: #FCEBEB; color: #A32D2D; }
.alert-success { background: #EAF3DE; color: #3B6D11; }

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F8F8F7;
}

.login-box {
    background: #ffffff;
    border: 0.5px solid rgba(0,0,0,0.1);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
}

.login-logo { font-size: 18px; font-weight: 600; color: #1a1a1a; margin-bottom: 4px; }
.login-sub { font-size: 13px; color: #888; margin-bottom: 32px; }
