/* PRISL Workshops Admin Stylesheet */
:root {
    --primary: #0A2540;
    --primary-light: #163e69;
    --accent: #d97706;
    --accent-hover: #b45309;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0284c7;
    --bg-page: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    font-size: 14px;
}

/* Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background-color: var(--primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.brand-img {
    height: 38px;
    border-radius: 4px;
}

.brand-text h3 {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

.brand-text span {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    padding: 20px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: #cbd5e1;
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.menu-item i {
    width: 18px;
    font-size: 15px;
    text-align: center;
}

.menu-item:hover {
    background: rgba(255,255,255,0.08);
    color: #fff;
}

.menu-item.active {
    background: #1e3a5f;
    color: #38bdf8;
    font-weight: 600;
}

.menu-badge {
    margin-left: auto;
    background: #ef4444;
    color: #fff;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.menu-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 12px 0;
}

.external-icon {
    font-size: 10px;
    margin-left: auto;
    opacity: 0.7;
}

.sidebar-user {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1e3a5f;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #38bdf8;
    font-size: 16px;
}

.user-info h4 {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

.user-role {
    font-size: 11px;
    color: #94a3b8;
}

/* Main Content */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-header {
    background: #fff;
    padding: 20px 32px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header-title h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.header-title p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

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

.admin-content {
    padding: 28px 32px;
    flex: 1;
}

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

.stat-card {
    background: #fff;
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.bg-blue { background: #e0f2fe; color: #0284c7; }
.bg-warning { background: #fef3c7; color: #d97706; }
.bg-success { background: #dcfce7; color: #16a34a; }
.bg-primary { background: #e2e8f0; color: #0f172a; }

.stat-data {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
    margin: 2px 0;
}

.stat-sub {
    font-size: 12px;
    color: var(--text-muted);
}

/* Cards */
.card {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.card-body {
    padding: 24px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    background: #f8fafc;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: #f8fafc;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

.badge-code { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; font-family: monospace; }
.badge-status { text-transform: uppercase; letter-spacing: 0.3px; }
.badge-active { background: #dcfce7; color: #15803d; }
.badge-upcoming { background: #fef3c7; color: #b45309; }
.badge-closed { background: #fee2e2; color: #b91c1c; }
.badge-completed { background: #e2e8f0; color: #475569; }

.badge-pay { text-transform: uppercase; letter-spacing: 0.3px; }
.badge-pay-verified { background: #dcfce7; color: #15803d; }
.badge-pay-pending { background: #fef3c7; color: #b45309; }
.badge-pay-rejected { background: #fee2e2; color: #b91c1c; }

.badge-member { background: #e0e7ff; color: #4338ca; }
.badge-nonmember { background: #f1f5f9; color: #64748b; }
.badge-corporate { background: #f5f3ff; color: #6d28d9; }
.badge-individual { background: #f0fdf4; color: #166534; }
.badge-outline { background: transparent; border: 1px solid #cbd5e1; color: #475569; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }

.btn-secondary { background: #475569; color: #fff; }
.btn-secondary:hover { background: #334155; }

.btn-outline { background: transparent; border-color: var(--border); color: var(--text-main); }
.btn-outline:hover { background: #f8fafc; border-color: #cbd5e1; }

.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-xs { padding: 2px 8px; font-size: 11px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; justify-content: center; }

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-main);
    transition: border 0.2s ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Filters bar */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
}

.filter-col {
    min-width: 180px;
}

.filter-col.flex-grow {
    flex: 1;
    min-width: 240px;
}

/* Grid & Utilities */
.row { display: flex; flex-wrap: wrap; margin: -10px; }
.col-md-3 { width: 25%; padding: 10px; }
.col-md-4 { width: 33.333%; padding: 10px; }
.col-md-6 { width: 50%; padding: 10px; }
.col-md-12 { width: 100%; padding: 10px; }
@media (max-width: 768px) {
    .col-md-3, .col-md-4, .col-md-6 { width: 100%; }
}

.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.font-weight-bold { font-weight: 700; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-4 { margin-bottom: 20px; }
.mr-2 { margin-right: 8px; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.p-0 { padding: 0 !important; }

/* Empty state */
.empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 38px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-warning { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }

/* Admin Modal */
.admin-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-modal-content {
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 750px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.admin-modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: var(--text-muted);
}

.admin-modal-body {
    padding: 24px;
}

/* Login Page Specific */
.login-body {
    background: linear-gradient(135deg, #0A2540 0%, #163e69 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-box {
    background: #fff;
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3);
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    height: 48px;
    margin-bottom: 12px;
}

.login-brand h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.login-brand p {
    font-size: 13px;
    color: var(--text-muted);
}

.login-hint {
    margin-top: 20px;
    padding: 12px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: #475569;
    text-align: center;
}

.hint-badge {
    display: inline-block;
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1e293b;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.login-footer a {
    color: var(--text-muted);
    font-size: 13px;
    text-decoration: none;
}

.login-footer a:hover {
    color: var(--primary);
}

/* Communication & WhatsApp Action Buttons */
.btn-success {
    background-color: #16a34a;
    color: #ffffff;
    border: 1px solid #16a34a;
}
.btn-success:hover {
    background-color: #15803d;
    color: #ffffff;
}
.btn-whatsapp {
    background-color: #25D366;
    color: #ffffff;
    border: 1px solid #20bd5a;
    font-weight: 600;
}
.btn-whatsapp:hover {
    background-color: #1ea952;
    color: #ffffff;
}
.btn-info {
    background-color: #0284c7;
    color: #ffffff;
    border: 1px solid #0284c7;
}
.btn-info:hover {
    background-color: #0369a1;
    color: #ffffff;
}
.action-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-email-sent {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
}
