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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e1e2e;
    --darker: #181825;
    --light: #cdd6f4;
    --muted: #6c7086;
    --surface: #313244;
    --surface2: #45475a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--darker);
    color: var(--light);
    min-height: 100vh;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--darker) 0%, var(--dark) 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.logo p {
    color: var(--muted);
    font-size: 0.9rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--light);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--surface2);
    border-radius: 8px;
    background: var(--darker);
    color: var(--light);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Error/Success Messages */
.error-message {
    color: var(--danger);
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
}

.success-message {
    color: var(--secondary);
    margin-top: 15px;
    text-align: center;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--dark);
    padding: 20px;
    border-right: 1px solid var(--surface);
}

.sidebar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--surface);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--light);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--surface);
    color: var(--primary);
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header h2 {
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.credits-badge {
    background: var(--secondary);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
}

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

.stat-card {
    background: var(--surface);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
}

.stat-card h3 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--primary);
}

.stat-card p {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--surface2);
}

.card-header h3 {
    font-size: 1.1rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--surface2);
}

.table th {
    color: var(--muted);
    font-weight: 500;
    font-size: 0.875rem;
}

.table tr:hover {
    background: var(--surface2);
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--secondary);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Country Select */
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.country-btn {
    padding: 15px;
    background: var(--surface2);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    color: var(--light);
}

.country-btn:hover {
    border-color: var(--primary);
}

.country-btn.selected {
    border-color: var(--primary);
    background: var(--primary);
}

/* Phone Display */
.phone-display {
    background: var(--darker);
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
}

.phone-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 10px;
    font-family: monospace;
}

.sms-code {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface);
    padding: 30px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--light);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--surface2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 15px;
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
        gap: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobil iyileştirmeler */
@media (max-width: 768px) {
    .country-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    
    .country-btn {
        padding: 12px 8px !important;
        font-size: 0.85rem !important;
    }
    
    .search-box {
        font-size: 16px !important;
    }
    
    .card {
        padding: 15px !important;
    }
    
    .header h2 {
        font-size: 1.3rem;
    }
    
    .main-content {
        padding: 15px !important;
    }
    
    .phone-display {
        padding: 15px !important;
    }
    
    .phone-number {
        font-size: 1.3rem !important;
    }
    
    .sms-code {
        font-size: 1.5rem !important;
    }
}

@media (max-width: 480px) {
    .country-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .sidebar-logo {
        font-size: 1.1rem;
    }
}
