@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --black: #000000;
    --white: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #E5E5E5;
    --gray-300: #D4D4D4;
    --gray-400: #A3A3A3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--black);
    color: var(--white);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.login-page {
    background: var(--black);
    color: var(--white);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 12px;
    padding: 48px 40px;
    text-align: center;
}

.logo {
    margin-bottom: 24px;
    color: var(--white);
}

.logo-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--white);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
    animation: logoFadeIn 0.8s ease-in-out;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.2);
}

.logo-image-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--white);
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.15);
    transition: transform 0.2s ease;
}

.logo-image-small:hover {
    transform: rotate(5deg) scale(1.1);
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.login-box h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.subtitle {
    color: var(--gray-400);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--black);
    border: 1px solid var(--gray-700);
    border-radius: 6px;
    color: var(--white);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--white);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: var(--white);
    color: var(--black);
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-primary:hover {
    background: var(--gray-200);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 20px;
}

.login-footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-800);
}

.login-footer p {
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.classification {
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--white) !important;
}

.main-header {
    background: var(--gray-900);
    border-bottom: 1px solid var(--gray-800);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
    color: var(--white);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-weight: 600;
    font-size: 13px;
}

.user-role {
    font-size: 11px;
    color: var(--gray-500);
    letter-spacing: 1px;
}

.logout-btn {
    color: var(--white);
    padding: 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.logout-btn:hover {
    background: var(--gray-800);
}

.container {
    display: flex;
    min-height: calc(100vh - 64px);
}

.sidebar {
    width: 240px;
    background: var(--gray-900);
    border-right: 1px solid var(--gray-800);
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--gray-400);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 4px;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
}

.nav-item:hover {
    background: var(--gray-800);
    color: var(--white);
}

.nav-item.active {
    background: var(--white);
    color: var(--black);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-800);
}

.classification-badge {
    background: var(--white);
    color: var(--black);
    padding: 8px;
    border-radius: 6px;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
}

.main-content {
    flex: 1;
    padding: 32px;
    background: var(--black);
    overflow-y: auto;
}

.page-header {
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 4px;
    color: var(--white);
}

.page-subtitle {
    color: var(--gray-400);
    font-size: 14px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--white);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

.stat-icon {
    font-size: 32px;
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--white);
}

.stat-info p {
    color: var(--gray-400);
    font-size: 13px;
}

.dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.card {
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-800);
}

.card-header h2 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--white);
}

.card-body {
    padding: 24px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--gray-400);
    padding: 12px;
    border-bottom: 1px solid var(--gray-800);
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--gray-800);
    font-size: 13px;
    color: var(--white);
}

.data-table tr:hover {
    background: var(--gray-800);
}

.message-preview {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-800);
    font-size: 13px;
    color: var(--white);
}

.status-item:last-child {
    border-bottom: none;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--gray-900);
    border: 1px solid var(--gray-800);
    border-radius: 8px;
    color: var(--white);
    text-decoration: none;
    margin-bottom: 12px;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 500;
}

.action-btn:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

canvas {
    height: 300px !important;
}

.dashboard-col-8 {
    grid-column: span 2;
}

.dashboard-col-4 {
    grid-column: span 1;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--gray-700);
    background: var(--gray-900);
    color: var(--white);
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
}

.form-input:focus {
    outline: none;
    border-color: var(--white);
}

.btn-small {
    padding: 6px 12px;
    border: 1px solid var(--gray-700);
    background: var(--gray-900);
    color: var(--white);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: var(--gray-800);
    border-color: var(--gray-600);
}

.btn-danger {
    color: var(--error);
    border-color: var(--error);
}

.btn-danger:hover {
    background: var(--error);
    color: var(--white);
}

.active-badge, .expired-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.active-badge {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.expired-badge {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

@media (max-width: 968px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
}
