@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');

* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    background-color: #0b0f19;
    color: #94a3b8;
    margin: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* GLOBAL INPUTS & BUTTONS (FIXED: Added type="email") */
input[type="text"], input[type="password"], input[type="email"], input[type="date"], input[type="number"], input[type="file"], select, textarea {
    width: 100%; padding: 12px 15px; background-color: #0b0f19; border: 1px solid #334155 !important;
    color: #f8fafc; border-radius: 8px; font-size: 14px; outline: none; transition: 0.2s ease-in-out;
}
input:focus, select:focus, textarea:focus { border-color: #3b82f6 !important; box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2); }
.input-label { color: #94a3b8; font-size: 12px; margin-bottom: 6px; display: block; font-weight: 500;}

.btn-manual { background:#3b82f6; color:white; padding:12px 25px; font-weight:600; border:1px solid #3b82f6; border-radius:8px; cursor:pointer; transition: 0.2s;}
.btn-manual:hover { background:#0056b3; border-color:#0056b3;}
.btn-csv { background:#10b981; color:white; padding:12px 25px; font-weight:600; border:1px solid #10b981; border-radius:8px; cursor:pointer; transition: 0.2s;}
.btn-csv:hover { background:#059669; border-color:#059669;}

/* SIDEBAR */
.sidebar { width: 260px; background-color: #111827; display: flex; flex-direction: column; border-right: 1px solid #1f2937; transition: margin-left 0.3s ease; z-index: 1000; }
.sidebar.collapsed { margin-left: -260px; }
.sidebar-header { padding: 25px 20px; border-bottom: 1px solid #1f2937; text-align: center; }
.sidebar-header h2 { color: #f8fafc; margin: 0; font-size: 20px; font-weight: 600; }
.sidebar a { color: #94a3b8; text-decoration: none; padding: 16px 25px; font-size: 14px; font-weight: 500; display: flex; align-items: center; transition: all 0.2s ease; border-bottom: 1px solid #1a1e2b; }
.sidebar a:hover { background-color: #1f2937; color: #f8fafc; border-left: 3px solid #3b82f6; }

/* MAIN CONTENT AREA */
.main-wrapper { flex-grow: 1; display: flex; flex-direction: column; overflow-y: auto; background-color: #0b0f19; }
.top-nav { background-color: #111827; padding: 15px 30px; display: flex; align-items: center; border-bottom: 1px solid #1f2937; }
.menu-toggle { background: transparent; border: 1px solid #334155; color: #cbd5e1; font-size: 18px; cursor: pointer; margin-right: 20px; padding: 6px 12px; border-radius: 6px; transition: 0.2s; }
.menu-toggle:hover { background: #1f2937; color: #fff; }
.nav-title { margin: 0; font-size: 16px; font-weight: 500; color: #e2e8f0; }

.content { padding: 30px; }
.card { background-color: #111827; border-radius: 10px; margin-bottom: 25px; border: 1px solid #1f2937; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.card h3 { margin-top:0; color:#f8fafc; margin-bottom: 25px; border-bottom: 1px solid #1f2937; padding-bottom: 15px; font-size: 18px; font-weight: 600;}

/* TABLES */
.table-container { overflow-x: auto; padding: 10px 20px; }
table { width: 100%; border-collapse: collapse; border: 1px solid #1f2937; }
th, td { padding: 18px 15px; text-align: left; border-bottom: 1px solid #1f2937; font-size: 13px; }
th { color: #64748b; font-weight: 600; text-transform: uppercase; font-size: 11px; letter-spacing: 1px; }
tr:last-child td { border-bottom: none; }
tr:hover td { background-color: #1e293b; }

.custom-checkbox { appearance: none; background-color: #1e293b; margin: 0; width: 18px; height: 18px; border: 1px solid #334155; border-radius: 4px; cursor: pointer; display: grid; place-content: center; transition: 0.2s; }
.custom-checkbox:checked { background-color: #3b82f6; border-color: #3b82f6; }

.action-btns { display: flex; gap: 10px; justify-content: flex-end; }
.btn-edit { color: #3b82f6; background: rgba(59, 130, 246, 0.1); padding: 6px 12px; border-radius: 4px; text-decoration: none; font-size: 12px; font-weight: 500; transition: 0.2s; border: 1px solid rgba(59, 130, 246, 0.3);}
.btn-edit:hover { background: rgba(59, 130, 246, 0.2); }
.btn-delete { color: #f87171; background: rgba(239, 68, 68, 0.1); padding: 6px 12px; border-radius: 4px; text-decoration: none; font-size: 12px; font-weight: 500; transition: 0.2s; border: 1px solid rgba(239, 68, 68, 0.3);}
.btn-delete:hover { background: rgba(239, 68, 68, 0.2); }

.badge { padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; border: 1px solid;}
.badge-green { background-color: rgba(16, 185, 129, 0.1); color: #34d399; border-color: rgba(16,185,129,0.3);}
.badge-yellow { background-color: rgba(245, 158, 11, 0.1); color: #fbbf24; border-color: rgba(245,158,11,0.3);}
.badge-red { background-color: rgba(239, 68, 68, 0.1); color: #f87171; border-color: rgba(239,68,68,0.3);}
.full-width { grid-column: 1 / -1; background: rgba(30, 41, 59, 0.5); padding: 15px; border-radius: 8px; border: 1px dashed #475569; }

/* FIX WHATSAPP COLOR FOREVER */
.wa-link, .wa-link:visited, .wa-link:active { color: #10b981 !important; text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.wa-link:hover { color: #34d399 !important; text-decoration: underline; }
.copy-btn { color: #10b981; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; transition: 0.2s; padding: 4px 8px; border-radius: 4px; }
.copy-btn:hover { color: #34d399; background: rgba(16, 185, 129, 0.1); }
.secure-pass-box { background-color: #1e1e2d !important; border: 1px solid #ef4444 !important; color: white; }
.secure-pass-box:focus { box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2) !important; }

/* MAGIC PRINT CSS */
@media print {
    body { background-color: white !important; }
    .sidebar, .top-nav, .top-controls, .action-btns, th:first-child, td:first-child, th:last-child, td:last-child { display: none !important; }
    .main-wrapper { width: 100%; margin: 0; padding: 0; background-color: white !important; }
    .card { border: none !important; box-shadow: none !important; background: white !important; margin: 0; padding: 0; }
    table { width: 100%; border-collapse: collapse; }
    th, td { border: 1px solid #ccc !important; color: #000 !important; padding: 8px !important; }
    .badge { border: none !important; color: #000 !important; background: transparent !important; }
    .wa-link { color: #000 !important; text-decoration: none !important; }
    * { color: #000 !important; }
}

/* MOBILE OPTIMIZATION */
@media (max-width: 768px) {
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0; border-radius: 8px;}
    table { min-width: 800px; } 
    th, td { white-space: nowrap; padding: 12px 10px; } 
    
    .content { padding: 15px; } 
    .top-controls { flex-direction: column; gap: 10px; align-items: stretch; }
    .delete-group { flex-direction: column; width: 100%; gap: 10px;}
    .search-box, .secure-pass-box, .btn-export, .btn-bulk-delete { width: 100% !important; max-width: 100% !important; justify-content: center; }
    
    .sidebar { position: fixed; height: 100vh; margin-left: -260px; box-shadow: 5px 0 15px rgba(0,0,0,0.5); }
    .sidebar.collapsed { margin-left: 0; } 
}