/* ===================================
   ADMIN PANEL STYLES
   =================================== */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f1f5f9;
    min-height: 100vh;
}

/* ===================================
   LOGIN PAGE
   =================================== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1e40af 0%, #312e81 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.login-header h1 {
    font-size: 24px;
    color: #0f172a;
    margin-bottom: 8px;
}

.login-header p {
    color: #64748b;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30,64,175,0.1);
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #1e40af 0%, #312e81 100%);
    color: white;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30,64,175,0.3);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.error-msg {
    background: #fee2e2;
    color: #dc2626;
    padding: 12px 15px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    display: none;
}

.back-link {
    text-align: center;
    margin-top: 25px;
}

.back-link a {
    color: #1e40af;
    text-decoration: none;
    font-size: 14px;
}

.back-link a:hover {
    text-decoration: underline;
}

/* ===================================
   DASHBOARD
   =================================== */
.dashboard {
    display: none;
}

.dashboard-header {
    background: linear-gradient(135deg, #1e40af 0%, #312e81 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.dashboard-title h1 {
    font-size: 24px;
}

.dashboard-title p {
    font-size: 13px;
    opacity: 0.8;
}

.dashboard-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-white {
    background: white;
    color: #1e40af;
}

.btn-white:hover {
    background: #f8fafc;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-success {
    background: #059669;
    color: white;
}

.btn-success:hover {
    background: #047857;
}

.dashboard-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-card h3 {
    font-size: 32px;
    color: #1e40af;
    margin-bottom: 5px;
}

.stat-card p {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

/* Data Table */
.table-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow: hidden;
}

.table-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.table-header h2 {
    font-size: 18px;
    color: #0f172a;
}

.table-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 10px 15px 10px 40px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 13px;
    width: 250px;
}

.search-box::before {
    content: '🔍';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

th {
    background: #f8fafc;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tr:hover {
    background: #f8fafc;
}

td {
    font-size: 13px;
    color: #334155;
}

.course-badge {
    background: #dbeafe;
    color: #1e40af;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
}

.action-btns {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.action-btn-whatsapp {
    background: #25D366;
    color: white;
}

.action-btn-whatsapp:hover {
    background: #128C7E;
}

.action-btn-call {
    background: #1e40af;
    color: white;
}

.action-btn-call:hover {
    background: #1e3a8a;
}

.action-btn-delete {
    background: #fee2e2;
    color: #dc2626;
}

.action-btn-delete:hover {
    background: #fecaca;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-state-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .dashboard-header {
        flex-direction: column;
        text-align: center;
    }
    
    .table-header {
        flex-direction: column;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    th,
    td {
        padding: 12px 15px;
        font-size: 12px;
    }
}
