/* ============================================
   OmniVoice API Gateway — Admin Styles
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f0f2f5; color: #333; font-size: 14px; line-height: 1.6;
}

/* Login */
.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: linear-gradient(135deg, #1a1a2e, #16213e);
}
.login-box {
    background: #fff; border-radius: 12px; padding: 40px;
    width: 380px; max-width: 90%; box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.login-box h1 { text-align: center; font-size: 28px; color: #1a1a2e; }
.login-box .subtitle { text-align: center; color: #888; margin-bottom: 24px; font-size: 13px; }

/* Layout */
.app-layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px; background: #1a1a2e; color: #fff;
    display: flex; flex-direction: column; position: fixed; top: 0; left: 0;
    height: 100vh; z-index: 100;
}
.sidebar-header {
    padding: 20px; font-size: 20px; font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.sidebar nav { flex: 1; display: flex; flex-direction: column; padding: 10px 0; }
.sidebar nav a {
    color: rgba(255,255,255,0.7); text-decoration: none; padding: 12px 20px;
    transition: all 0.2s; font-size: 14px;
}
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(255,255,255,0.1); color: #fff; }
.main-content { margin-left: 220px; flex: 1; }
.topbar {
    background: #fff; padding: 12px 24px; border-bottom: 1px solid #e8e8e8;
    text-align: right; font-size: 13px; color: #666;
}
.content { padding: 24px; }
.content h2 { margin-bottom: 16px; font-size: 20px; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.stat-card {
    background: #fff; border-radius: 8px; padding: 20px; text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.stat-value { font-size: 32px; font-weight: 700; color: #4f8cff; }
.stat-label { color: #888; font-size: 13px; margin-top: 4px; }

/* Card */
.card {
    background: #fff; border-radius: 8px; padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.card h3 { margin-bottom: 12px; font-size: 16px; }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.table th { background: #fafafa; font-weight: 600; color: #555; white-space: nowrap; }
.table tr:hover { background: #f8f9ff; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Form */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 500; color: #555; font-size: 13px; }
input[type="text"], input[type="password"], input[type="email"], input[type="number"], select {
    width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px;
    font-size: 14px; outline: none; transition: border 0.2s;
}
input:focus, select:focus { border-color: #4f8cff; box-shadow: 0 0 0 2px rgba(79,140,255,0.2); }

/* Buttons */
.btn {
    display: inline-block; padding: 8px 16px; border: 1px solid #d9d9d9;
    border-radius: 6px; background: #fff; cursor: pointer; font-size: 13px;
    transition: all 0.2s; text-decoration: none; color: #333;
}
.btn:hover { border-color: #4f8cff; color: #4f8cff; }
.btn-primary { background: #4f8cff; border-color: #4f8cff; color: #fff; }
.btn-primary:hover { background: #3b7ae6; border-color: #3b7ae6; color: #fff; }
.btn-danger { color: #ff4d4f; border-color: #ff4d4f; }
.btn-danger:hover { background: #ff4d4f; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; padding: 10px; font-size: 15px; }

/* Badge */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.badge-success { background: #f6ffed; color: #52c41a; border: 1px solid #b7eb8f; }
.badge-danger { background: #fff2f0; color: #ff4d4f; border: 1px solid #ffccc7; }

/* Alert */
.alert { padding: 10px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; }
.alert-error { background: #fff2f0; border: 1px solid #ffccc7; color: #ff4d4f; }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 12px; margin-top: 16px; justify-content: center; }
.pagination a { padding: 6px 12px; border: 1px solid #d9d9d9; border-radius: 4px; text-decoration: none; color: #333; font-size: 13px; }
.pagination a:hover { border-color: #4f8cff; color: #4f8cff; }

/* Misc */
.text-muted { color: #999; font-size: 13px; }
