/* SignalWire SMS Verification - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2196F3;
    --success-color: #4CAF50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #00bcd4;
    --dark-color: #263238;
    --light-bg: #f5f7fa;
    --border-color: #e0e0e0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--light-bg);
    color: #333;
    line-height: 1.6;
}

/* Auth Pages */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 5px;
}

.auth-logo p {
    color: #666;
    font-size: 14px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.auth-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #1976D2;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-secondary {
    background: #757575;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

/* App Container */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header h1 {
    font-size: 20px;
    color: var(--dark-color);
}

.header-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.user-balance {
    background: var(--light-bg);
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 600;
}

.user-menu {
    position: relative;
    cursor: pointer;
}

.user-menu .dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    min-width: 150px;
    margin-top: 10px;
}

.user-menu:hover .dropdown {
    display: block;
}

.user-menu .dropdown a {
    display: block;
    padding: 10px 15px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s;
}

.user-menu .dropdown a:hover {
    background: var(--light-bg);
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--dark-color);
    color: white;
    padding: 20px 0;
    position: fixed;
    height: calc(100vh - 70px);
    overflow-y: auto;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-menu a:hover, .nav-menu li.active a {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left: 4px solid var(--primary-color);
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 30px;
    flex: 1;
    min-height: calc(100vh - 70px);
}

.app-container {
    display: flex;
}

.sidebar {
    flex-shrink: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.bg-blue { background: var(--primary-color); }
.stat-icon.bg-green { background: var(--success-color); }
.stat-icon.bg-purple { background: #9c27b0; }
.stat-icon.bg-gold { background: #ff9800; }

.stat-content h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark-color);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.data-table thead {
    background: var(--dark-color);
    color: white;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--light-bg);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-pending { background: #fff3cd; color: #856404; }
.badge-active { background: #cfe2ff; color: #084298; }
.badge-completed { background: #d1e7dd; color: #0f5132; }
.badge-cancelled { background: #f8d7da; color: #842029; }
.badge-expired { background: #e2e3e5; color: #41464b; }
.badge-success { background: var(--success-color); color: white; }
.badge-in-use { background: var(--warning-color); color: white; }
.badge-available { background: var(--success-color); color: white; }

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.service-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.service-card:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.service-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.service-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.service-price {
    color: var(--success-color);
    font-weight: 700;
    margin-bottom: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* HISTORY FILTER BAR (premium compact) */
.history-filters{
  background:#fff;
  border-radius:14px;
  padding:14px 16px;
  box-shadow:0 10px 30px rgba(0,0,0,.06);
  margin-bottom:14px;
}
.history-filters .row{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:flex-end;
}
.history-filters .fg{
  min-width:160px;
}
.history-filters label{
  font-size:12px;
  font-weight:700;
  color:#111827;
  margin-bottom:6px;
  display:block;
  text-transform:uppercase;
}
.history-filters input,
.history-filters select{
  height:40px;
  border-radius:10px;
  border:1px solid rgba(0,0,0,.12);
}
.history-filters .searchbox{
  flex:1;
  min-width:240px;
}
.history-filters .btn-apply{
  height:40px;
  border-radius:10px;
  font-weight:700;
  padding:0 16px;
}
.history-filters .btn-clear{
  height:40px;
  border-radius:10px;
  padding:0 14px;
}

/* Table header match */
.history-table thead th{
  background:#1f2937;
  color:#fff;
  font-weight:700;
  border:0 !important;
}
.history-table td, .history-table th{
  vertical-align:middle;
}
.badge-status{
  padding:6px 10px;
  border-radius:999px;
  font-weight:700;
  font-size:12px;
}
.badge-completed{ background:#d1fae5; color:#065f46; }
.badge-cancelled{ background:#fee2e2; color:#991b1b; }
.badge-pending{ background:#fef3c7; color:#92400e; }


/* Premium Amount Input */
.premium-amount-input {
    position: relative;
    display: flex;
    align-items: center;
}

.premium-amount-input .currency-symbol {
    position: absolute;
    left: 20px;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    z-index: 2;
}

.premium-amount-input .premium-input {
    padding-left: 50px;
    font-size: 24px;
    font-weight: 600;
    height: 60px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    background: white;
    transition: all 0.3s ease;
}

.premium-amount-input .premium-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    outline: none;
}

.premium-amount-input .premium-input::placeholder {
    color: #ccc;
    font-weight: 500;
}
