/**
 * OTP Thailand - Modern Minimal CSS
 */

:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    --light: #f8fafc;
    --dark: #1e293b;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Base */
body {
    font-family: 'Prompt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
}

/* Navbar */
.navbar {
    padding: 0.75rem 0;
}

.navbar-brand {
    font-size: 1.25rem;
    color: var(--primary) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--gray-600) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: var(--primary) !important;
    background-color: var(--gray-100);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--white);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    padding: 1rem 1.25rem;
}

/* Service Cards */
.service-card {
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    border-color: var(--primary);
}

.service-card.selected {
    border-color: var(--primary);
    background-color: rgba(79, 70, 229, 0.05);
}

.service-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.service-icon.shopee { background: linear-gradient(135deg, #ee4d2d 0%, #f26522 100%); color: white; }
.service-icon.lazada { background: linear-gradient(135deg, #0f146d 0%, #1a1f87 100%); color: white; }
.service-icon.tiktok { background: linear-gradient(135deg, #000000 0%, #25f4ee 50%, #fe2c55 100%); color: white; }
.service-icon.instagram { background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%); color: white; }
.service-icon.facebook { background: linear-gradient(135deg, #1877f2 0%, #0d65d9 100%); color: white; }
.service-icon.netflix { background: linear-gradient(135deg, #e50914 0%, #b20710 100%); color: white; }
.service-icon.grab { background: linear-gradient(135deg, #00b14f 0%, #009a44 100%); color: white; }
.service-icon.bolt { background: linear-gradient(135deg, #34d186 0%, #2ab573 100%); color: white; }
.service-icon.seveneleven { background: linear-gradient(135deg, #f7941d 0%, #00a651 100%); color: white; }
.service-icon.lotus { background: linear-gradient(135deg, #e31e24 0%, #c41a1f 100%); color: white; }
.service-icon.bigc { background: linear-gradient(135deg, #ed1c24 0%, #c41a1f 100%); color: white; }
.service-icon.line { background: linear-gradient(135deg, #00c300 0%, #00b300 100%); color: white; }

.service-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.service-category {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.service-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.service-stock {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.service-stock.in-stock {
    color: var(--success);
}

.service-stock.low-stock {
    color: var(--warning);
}

.service-stock.out-of-stock {
    color: var(--danger);
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

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

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

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

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

.btn-success {
    background-color: var(--success);
    border-color: var(--success);
}

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

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    padding: 0.625rem 0.875rem;
    transition: all 0.2s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.375rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    background-color: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    border-bottom: 2px solid var(--gray-200);
    padding: 0.875rem;
}

.table td {
    padding: 0.875rem;
    vertical-align: middle;
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
}

/* Stats Cards */
.stat-card {
    padding: 1.5rem;
    border-radius: var(--border-radius);
    background: var(--white);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* OTP Display */
.otp-display {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: var(--success);
    background-color: var(--gray-100);
    padding: 1rem 2rem;
    border-radius: 12px;
    text-align: center;
}

.phone-display {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending { background-color: #fef3c7; color: #92400e; }
.status-waiting { background-color: #dbeafe; color: #1e40af; }
.status-received { background-color: #d1fae5; color: #065f46; }
.status-cancelled { background-color: #fee2e2; color: #991b1b; }
.status-timeout { background-color: #f3f4f6; color: #374151; }

/* Order Card */
.order-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary);
}

.order-card.received {
    border-left-color: var(--success);
}

.order-card.cancelled {
    border-left-color: var(--danger);
}

/* Credit Display */
.credit-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--success);
}

/* Copy Button */
.copy-btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Loading Spinner */
.spinner-custom {
    width: 3rem;
    height: 3rem;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Pulse Animation */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive */
@media (max-width: 768px) {
    .service-card {
        margin-bottom: 1rem;
    }
    
    .credit-display {
        font-size: 2rem;
    }
    
    .otp-display {
        font-size: 1.5rem;
        padding: 0.75rem 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
}

/* Auth Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.auth-card {
    max-width: 420px;
    width: 100%;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    font-size: 2.5rem;
    color: var(--primary);
}

/* Sidebar Admin */
.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: var(--dark);
    position: fixed;
    left: 0;
    top: 0;
    padding-top: 1rem;
}

.admin-content {
    margin-left: 260px;
    padding: 2rem;
    min-height: 100vh;
    background: var(--gray-50);
}

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: var(--gray-400);
    text-decoration: none;
    transition: all 0.2s ease;
}

.sidebar-link:hover, .sidebar-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.sidebar-link i {
    width: 24px;
    margin-right: 0.75rem;
}

@media (max-width: 991px) {
    .admin-sidebar {
        width: 100%;
        position: relative;
        min-height: auto;
    }
    
    .admin-content {
        margin-left: 0;
    }
}

/* Topup Methods */
.topup-method {
    cursor: pointer;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
}

.topup-method:hover {
    border-color: var(--primary);
    background-color: rgba(79, 70, 229, 0.05);
}

.topup-method.selected {
    border-color: var(--primary);
    background-color: rgba(79, 70, 229, 0.1);
}

.topup-method-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Service Custom Image */
.service-custom-image {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow);
}
