/* =============================================
   PT SAHABAT STUDI RUSIA - ADMIN DASHBOARD CSS
   ============================================= */
 
/* ===== LOGIN PAGE ===== */
.admin-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    padding: 20px;
}
 
.admin-login-container {
    width: 100%;
    max-width: 420px;
}
 
.admin-login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
    text-align: center;
}
 
.login-logo {
    font-size: 3rem;
    margin-bottom: 8px;
}
 
.admin-login-card h2 {
    color: var(--primary-dark);
    margin-bottom: 4px;
    font-size: 1.5rem;
}
 
.admin-login-card .subtitle {
    color: var(--gray-500);
    font-size: 0.88rem;
    margin-bottom: 30px;
}
 
.admin-login-card .form-group {
    text-align: left;
}
 
.login-hint {
    margin-top: 20px;
    font-size: 0.78rem;
    color: var(--gray-400);
}
 
.back-to-site {
    display: inline-block;
    margin-top: 12px;
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}
 
.back-to-site:hover {
    color: var(--accent);
}
 
/* ===== DASHBOARD LAYOUT ===== */
.admin-dashboard {
    display: none;
    min-height: 100vh;
    background: var(--gray-100);
}
 
.admin-dashboard.active {
    display: block;
}
 
/* ===== ADMIN HEADER ===== */
.admin-header {
    background: var(--white);
    padding: 16px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-wrap: wrap;
    gap: 12px;
}
 
.admin-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
 
.admin-header h2 {
    font-size: 1.2rem;
    color: var(--primary-dark);
}
 
.admin-company-name {
    font-size: 0.8rem;
    color: var(--gray-400);
    padding: 4px 12px;
    background: var(--gray-100);
    border-radius: 50px;
}
 
.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
 
.admin-user {
    font-size: 0.85rem;
    color: var(--gray-500);
}
 
/* ===== ADMIN TABS ===== */
.admin-tabs {
    background: var(--white);
    padding: 0 30px;
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--gray-200);
    overflow-x: auto;
}
 
.admin-tab {
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
}
 
.admin-tab:hover { color: var(--primary); }
 
.admin-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
 
/* ===== ADMIN CONTENT ===== */
.admin-content {
    padding: 30px;
}
 
.admin-panel {
    display: none;
}
 
.admin-panel.active {
    display: block;
}
 
.panel-title {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--gray-800);
}
 
.panel-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
 
/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
 
.stat-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}
 
.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}
 
.stat-info h3 { font-size: 1.6rem; font-weight: 800; color: var(--gray-900); }
.stat-info p { font-size: 0.8rem; color: var(--gray-500); }
 
/* ===== CHART ===== */
.chart-placeholder {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
 
.chart-placeholder h3 { font-size: 1rem; color: var(--gray-800); margin-bottom: 20px; }
 
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 200px;
    padding-top: 20px;
}
 
.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; }
 
.bar {
    width: 100%;
    border-radius: 6px 6px 0 0;
    transition: var(--transition);
    min-height: 10px;
}
 
.bar:hover { opacity: 0.8; }
.bar-label { font-size: 0.7rem; color: var(--gray-500); }
.bar-value { font-size: 0.7rem; font-weight: 600; color: var(--gray-700); }
 
/* ===== ADMIN TABLE ===== */
.admin-table-wrapper {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 20px;
}
 
.admin-table-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-200);
    flex-wrap: wrap;
    gap: 12px;
}
 
.admin-table-header h3 { font-size: 1.1rem; color: var(--gray-800); }
 
.table-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
 
.admin-table-search {
    padding: 8px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    width: 250px;
    transition: var(--transition);
    font-family: inherit;
}
 
.admin-table-search:focus {
    outline: none;
    border-color: var(--primary-light);
}
 
.admin-table {
    width: 100%;
    border-collapse: collapse;
}
 
.admin-table th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
 
.admin-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
    color: var(--gray-700);
}
 
.admin-table tr:hover td { background: var(--gray-50); }
 
/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}
 
.status-badge.lead { background: #e3f2fd; color: #1565c0; }
.status-badge.active { background: #e8f5e9; color: #2e7d32; }
.status-badge.visa { background: #fff3e0; color: #e65100; }
.status-badge.completed { background: #f3e5f5; color: #7b1fa2; }
.status-badge.pending { background: #fff8e1; color: #f57f17; }
.status-badge.paid { background: #e8f5e9; color: #2e7d32; }
.status-badge.overdue { background: #ffebee; color: #c62828; }
.status-badge.new { background: #e3f2fd; color: #1565c0; }
.status-badge.contacted { background: #e8f5e9; color: #2e7d32; }
 
.action-btn {
    padding: 6px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: var(--white);
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
    margin-right: 4px;
}
 
.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}
 
/* ===== KANBAN ===== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    min-height: 500px;
}
 
.kanban-column {
    background: var(--gray-100);
    border-radius: var(--radius-md);
    padding: 16px;
}
 
.kanban-column-header { margin-bottom: 16px; }
 
.kanban-column-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}
 
.kanban-count {
    background: var(--gray-300);
    color: var(--gray-700);
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}
 
.kanban-card {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 10px;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
 
.kanban-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
 
.kanban-card.lead { border-left-color: #1565c0; }
.kanban-card.active-s { border-left-color: #2e7d32; }
.kanban-card.visa { border-left-color: #e65100; }
.kanban-card.complete { border-left-color: #7b1fa2; }
 
.kanban-card h4 { font-size: 0.9rem; color: var(--gray-800); margin-bottom: 4px; }
.kanban-card p { font-size: 0.75rem; color: var(--gray-500); }
 
.kanban-card-tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
 
.kanban-tag {
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--gray-100);
    color: var(--gray-600);
    font-weight: 500;
}
 
/* ===== FINANCE ===== */
.finance-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
 
.finance-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
 
.finance-card h4 {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
 
.finance-card .amount { font-size: 1.5rem; font-weight: 800; }
.finance-card .trend { font-size: 0.8rem; margin-top: 4px; color: var(--gray-500); }
.trend.up { color: var(--success); }
.trend.down { color: var(--danger); }
 
/* ===== SOP ===== */
.sop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
 
.sop-card {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
 
.sop-card h3 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 16px;
}
 
.sop-step {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
}
 
.sop-step:last-child { border-bottom: none; }
 
.sop-step-num {
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
}
 
.sop-step-text { font-size: 0.85rem; color: var(--gray-700); }
 
/* ===== TEMPLATES ===== */
.template-card {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 16px;
}
 
.template-header {
    padding: 16px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
 
.template-header h4 { font-size: 0.9rem; color: var(--gray-800); }
 
.template-body {
    padding: 20px;
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.8;
    white-space: pre-wrap;
    font-family: inherit;
}
 
/* ===== INVOICE ===== */
.invoice-preview {
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    max-width: 700px;
}
 
.invoice-header-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}
 
.invoice-company h2 { font-size: 1.5rem; color: var(--primary-dark); }
.invoice-company p { font-size: 0.85rem; color: var(--gray-500); }
 
.invoice-meta { text-align: right; }
.invoice-meta h3 { font-size: 1.3rem; color: var(--accent); margin-bottom: 4px; }
.invoice-meta p { font-size: 0.85rem; color: var(--gray-500); }
 
.invoice-client { margin-bottom: 24px; }
.invoice-client .label { font-weight: 600; color: var(--gray-700); font-size: 0.85rem; }
.invoice-client .name { font-size: 1.1rem; font-weight: 700; color: var(--primary-dark); }
.invoice-client .detail { color: var(--gray-500); font-size: 0.85rem; }
 
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}
 
.invoice-table th {
    background: var(--gray-50);
    padding: 12px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-500);
    border-bottom: 2px solid var(--gray-200);
}
 
.invoice-table td {
    padding: 12px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.9rem;
}
 
.invoice-total { text-align: right; margin-top: 20px; }
 
.invoice-total .row {
    display: flex;
    justify-content: flex-end;
    gap: 30px;
    padding: 6px 0;
    font-size: 0.9rem;
}
 
.invoice-total .row.grand {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-dark);
    border-top: 2px solid var(--gray-200);
    padding-top: 12px;
    margin-top: 8px;
}
 
.invoice-bank {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
    font-size: 0.85rem;
    color: var(--gray-600);
}
 
.invoice-bank .label { font-weight: 600; color: var(--gray-700); margin-bottom: 8px; }
.invoice-bank p { margin: 2px 0; }
 
.invoice-actions {
    text-align: center;
    margin-top: 30px;
    display: flex;
    gap: 10px;
    justify-content: center;
}
 
/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 4000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
 
.modal.active { display: flex; }
 
.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}
 
.modal-content h2 {
    font-size: 1.3rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}
 
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
 
.modal-actions .btn { flex: 1; }
 
/* ===== ADMIN RESPONSIVE ===== */
@media (max-width: 1024px) {
    .kanban-board { grid-template-columns: repeat(2, 1fr); }
}
 
@media (max-width: 768px) {
    .admin-header { padding: 12px 16px; }
    .admin-tabs { padding: 0 10px; }
    .admin-content { padding: 16px; }
    .kanban-board { grid-template-columns: 1fr; }
    .admin-table-wrapper { overflow-x: auto; }
    .admin-table { min-width: 600px; }
    .admin-table-search { width: 180px; }
    .invoice-preview { padding: 20px; }
    .admin-company-name { display: none; }
    .admin-user { display: none; }
}
 
@media (max-width: 480px) {
    .finance-summary { grid-template-columns: 1fr 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .table-actions { flex-direction: column; align-items: stretch; }
    .admin-table-search { width: 100%; }
}