@charset "UTF-8";

/* =============================================
   Dijital Kartvizit - Admin Panel CSS
   Premium landing-aligned brand system
   ============================================= */

:root {
    --brand-blue: #075be8;
    --brand-blue-dark: #1735d1;
    --brand-blue-soft: #eef4ff;
    --brand-red: #da2020;
    --brand-green: #15b879;
    --navy: #0b1730;
    --paper: #fffaf2;
    --brand-red-dark: #b91515;
    --white: #ffffff;
    --text-main: #09111f;
    --text-soft: #667085;
    --text-muted: #94a3b8;
    --border: #e7edf5;
    --bg-body: #f5f9ff;
    --bg-card: rgba(255, 255, 255, 0.90);
    --bg-sidebar: #0b1730;
    --shadow-sm: 0 10px 28px rgba(15, 23, 42, 0.05);
    --shadow-md: 0 18px 44px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 34px 90px rgba(15, 23, 42, 0.16);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-xl: 34px;
    --sidebar-width: 260px;
    --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-main);
    background:
        radial-gradient(circle at 14% 18%, rgba(7, 91, 232, 0.08), transparent 34%),
        radial-gradient(circle at 86% 82%, rgba(21, 184, 121, 0.08), transparent 36%),
        linear-gradient(180deg, #fffaf2 0%, var(--bg-body) 52%, #fff 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* =============================================
   Layout
   ============================================= */

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

/* =============================================
   Sidebar
   ============================================= */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0b1730 0%, #102a55 100%);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-logo img {
    max-height: 76px;
    max-width: 210px;
    width: 100%;
    border-radius: 14px !important;
    padding: 4px 10px !important;
    background: #ffffff;
    border: 1px solid rgba(255,255,255,0.9);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
    object-fit: contain;
}

.sidebar-logo i {
    font-size: 24px;
    color: var(--brand-red);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 20px;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: all var(--transition);
    margin-bottom: 2px;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.06);
}

.nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
    box-shadow: 0 14px 30px rgba(7, 91, 232, 0.26);
}

.nav-link i { width: 20px; text-align: center; font-size: 16px; }

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 12px 16px;
}

.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-red));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.user-info { display: flex; flex-direction: column; }
.user-name { color: #fff; font-weight: 600; font-size: 13px; }
.user-role { color: rgba(255,255,255,0.4); font-size: 11px; }

.logout-link { color: rgba(255,255,255,0.4) !important; }
.logout-link:hover { color: var(--brand-red) !important; background: rgba(218,32,32,0.1) !important; }

/* =============================================
   Main Content
   ============================================= */

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    min-width: 0;
}

.top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 32px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-main);
    cursor: pointer;
    padding: 8px;
}

.page-title {
    flex: 1;
    font-size: 24px;
    font-weight: 900;
    color: var(--text-main);
}

.content-area {
    padding: 28px 32px;
}

/* =============================================
   Cards
   ============================================= */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    backdrop-filter: blur(18px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(7,91,232,0.04), rgba(21,184,121,0.035));
}

.card-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i { color: var(--brand-blue); font-size: 18px; }

.card-body { padding: 24px; }

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

/* =============================================
   Dashboard
   ============================================= */

.dashboard-grid { display: flex; flex-direction: column; gap: 24px; }

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-info { display: flex; flex-direction: column; }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text-main); line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--text-soft); margin-top: 4px; }

.dashboard-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.activity-list { display: flex; flex-direction: column; gap: 12px; }

.activity-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border-radius: 999px;
    background: rgba(0,76,151,0.02);
    transition: background var(--transition);
}

.activity-item:hover { background: rgba(0,76,151,0.05); }

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-rank {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
}

.activity-details { flex: 1; }
.activity-details strong { display: block; font-size: 14px; }

/* =============================================
   Buttons
   ============================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
    color: #fff;
    box-shadow: 0 18px 38px rgba(7, 91, 232, 0.22);
}
.btn-primary:hover { box-shadow: 0 22px 46px rgba(7, 91, 232, 0.30); color: #fff; }

.btn-secondary { background: #f1f5f9; color: var(--text-main); }
.btn-secondary:hover { background: #e2e8f0; color: var(--text-main); }

.btn-success { background: linear-gradient(135deg, #059669, #047857); color: #fff; }
.btn-success:hover { color: #fff; }

.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; }
.btn-danger:hover { color: #fff; }

.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; }
.btn-warning:hover { color: #fff; }

.btn-info { background: linear-gradient(135deg, #0ea5e9, #0284c7); color: #fff; }
.btn-info:hover { color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }

/* =============================================
   Tables
   ============================================= */

.table-responsive { overflow-x: auto; }

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

.data-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-soft);
    background: rgba(0, 76, 151, 0.03);
    border-bottom: 2px solid var(--border);
}

.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    vertical-align: middle;
}

.data-table tbody tr:hover { background: rgba(0, 76, 151, 0.02); }

.user-cell { display: flex; align-items: center; gap: 12px; }
.user-cell-avatar {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 13px; flex-shrink: 0;
}
.user-cell-photo {
    width: 36px; height: 36px; border-radius: 10px;
    object-fit: cover; flex-shrink: 0;
}

/* =============================================
   Badges
   ============================================= */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

.badge-published { background: #ecfdf5; color: #047857; }
.badge-pending { background: #fff7ed; color: #c2410c; }
.badge-draft { background: #f1f5f9; color: #475569; }
.badge-rejected { background: #fef2f2; color: #dc2626; }
.badge-role { background: var(--brand-blue-soft); color: var(--brand-blue); }

/* =============================================
   Forms
   ============================================= */

.form-grid { max-width: 900px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

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

.form-input, .form-select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--border);
    border-radius: 18px;
    font-family: inherit;
    font-size: 14px;
    color: var(--text-main);
    background: rgba(255,255,255,.92);
    transition: all var(--transition);
    outline: none;
}

.form-input:focus, .form-select:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 5px rgba(7, 91, 232, 0.10);
}

.form-select {
    appearance: auto;
    cursor: pointer;
}

textarea.form-input { resize: vertical; min-height: 80px; }

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.form-section {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.form-section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--brand-blue);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 16px 20px;
    margin-bottom: 24px;
    background: rgba(0, 76, 151, 0.03);
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.form-info-bar code {
    padding: 2px 8px;
    background: rgba(0,76,151,0.08);
    border-radius: 6px;
    font-size: 12px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding-top: 28px;
    cursor: pointer;
}

.current-image { margin-bottom: 10px; }
.preview-image { max-width: 120px; border-radius: var(--radius-sm); }

/* =============================================
   Filter Bar
   ============================================= */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.filter-bar .form-input { max-width: 300px; }
.filter-bar .form-select { max-width: 200px; }

/* =============================================
   Action Buttons
   ============================================= */

.action-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.inline-form { display: inline; }

/* =============================================
   Alerts
   ============================================= */

.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 32px 20px;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success { background: #ecfdf5; color: #047857; border: 1px solid rgba(4,120,87,0.15); }
.alert-error { background: #fef2f2; color: #dc2626; border: 1px solid rgba(220,38,38,0.15); }

/* =============================================
   My Card
   ============================================= */

.my-card-container { max-width: 800px; }
.my-card-status { margin-bottom: 20px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.my-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.my-card-actions { margin-top: 24px; }

.preview-mini-card { text-align: center; padding: 20px; }
.preview-photo-area { margin-bottom: 16px; }
.preview-photo { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(0,76,151,0.1); }
.preview-avatar {
    width: 100px; height: 100px; border-radius: 50%; margin: 0 auto;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 28px; font-weight: 700;
}
.preview-title { color: var(--text-main); font-weight: 600; margin-bottom: 4px; }
.preview-dept { color: var(--text-soft); font-size: 13px; margin-bottom: 4px; }
.preview-company { color: var(--text-main); font-weight: 600; }

/* QR */
.qr-display { padding: 20px; text-align: center; }
.qr-image { max-width: 200px; border-radius: var(--radius-md); }
.qr-image-lg { max-width: 280px; border-radius: var(--radius-md); }
.qr-url { margin-top: 12px; color: var(--text-soft); font-size: 13px; word-break: break-all; }
.qr-actions { margin-top: 20px; display: flex; justify-content: center; gap: 12px; }
.my-card-share-actions {
    width: fit-content;
    max-width: calc(100% - 32px);
    margin-left: auto;
    margin-right: auto;
    padding: 0;
    box-sizing: border-box;
    flex-wrap: wrap;
}

/* Media */
.upload-form { margin-bottom: 24px; }
.upload-area { display: flex; gap: 12px; align-items: center; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.media-card {
    border: 1px solid var(--border); border-radius: var(--radius-md);
    overflow: hidden; background: #fff;
}
.media-thumb { height: 130px; overflow: hidden; }
.media-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-info { padding: 10px 12px; }
.media-name { display: block; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-meta { display: block; font-size: 11px; color: var(--text-muted); }
.media-card form { padding: 0 12px 10px; }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.page-info { color: var(--text-soft); font-size: 13px; }

/* Misc */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-warning { color: #d97706; }
.text-danger { color: var(--brand-red); }
.nowrap { white-space: nowrap; }

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 1024px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .dashboard-cols { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 16px 0 48px rgba(0,0,0,0.2);
    }
    
    .sidebar-close { display: block; }
    .menu-toggle { display: block; }
    
    .main-content {
        margin-left: 0;
        min-width: 0;
        max-width: 100%;
    }
    .top-bar { padding: 16px 20px; }
    .content-area { padding: 20px; }
    .my-card-share-actions { width: fit-content; max-width: 100%; padding: 0 8px; }
    .alert { margin: 0 20px 16px; }
    
    .stats-row { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .my-card-grid { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; }
    .filter-bar .form-input, .filter-bar .form-select { max-width: 100%; }
}

/* =============================================
   Premium Custom File Upload styling
   ============================================= */
.custom-file-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 2px dashed var(--border);
    padding: 8px 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
    width: 100%;
    margin-top: 8px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.01);
}
.custom-file-upload:hover {
    border-color: var(--brand-blue);
    background: rgba(7, 91, 232, 0.02);
}
.custom-file-upload input[type="file"] {
    display: none !important;
}
.custom-file-upload .upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--brand-blue-soft);
    color: var(--brand-blue);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 800;
    transition: all var(--transition);
    box-shadow: 0 2px 4px rgba(7, 91, 232, 0.06);
}
.custom-file-upload:hover .upload-btn {
    background: var(--brand-blue);
    color: #fff;
    box-shadow: 0 4px 8px rgba(7, 91, 232, 0.16);
}
.custom-file-upload .file-name {
    font-size: 13px;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

