/* CSS Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #000000;
    --secondary: #ffffff;
    --gray-100: #ffffff;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --radius: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--gray-100);
    color: var(--primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Mobile Only - User Side */
.user-container {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: var(--secondary);
    position: relative;
}

/* Mobile Only - Block tablets and desktops */
@media (min-width: 768px) {
    .user-only {
        display: none !important;
    }
    .desktop-message {
        display: flex !important;
    }
}

.desktop-message {
    display: none;
    height: 100vh;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    background: var(--primary);
    color: var(--secondary);
}

.desktop-message h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Header */
.header {
    background: var(--primary);
    color: var(--secondary);
    padding: 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Main Content */
.main-content {
    padding: 1.5rem;
}

/* Cards */
.card {
    background: var(--secondary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.2s;
    background: var(--secondary);
}

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

.form-input::placeholder {
    color: var(--gray-400);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--gray-800);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--gray-100);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--gray-300);
}

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

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

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

/* Messages */
.error-message {
    background: #fff5f5;
    color: #dc2626;
    padding: 0.875rem 1rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    border: 1px solid #fecaca;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.04);
}

.success-message {
    background: #f0fdf4;
    color: #166534;
    padding: 0.875rem 1rem;
    border-radius: 14px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
    border: 1px solid #86efac;
    box-shadow: 0 1px 2px rgba(34, 197, 94, 0.04);
}

/* Auth Links */
.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.auth-links a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* Verification Code Input */
.code-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1.5rem 0;
}

.code-input {
    width: 3rem;
    height: 3.5rem;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
}

.code-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Plan Cards */
.plan-card {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.plan-card:hover {
    border-color: var(--gray-400);
}

.plan-card.selected {
    border-color: var(--primary);
    background: var(--gray-100);
}

.plan-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.plan-card .price {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.plan-features {
    list-style: none;
}

.plan-features li {
    padding: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.plan-features li::before {
    content: "✓";
    margin-right: 0.5rem;
    color: var(--success);
}

/* Custom Plan Inputs */
.custom-inputs {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.range-input {
    width: 100%;
    margin: 0.5rem 0;
}

.range-value {
    text-align: center;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.badge-approved {
    background: #d1fae5;
    color: #065f46;
}

.badge-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* Request Card */
.request-card {
    background: var(--secondary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.request-title {
    font-weight: 600;
}

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

/* Logout Button */
.logout-btn {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 3rem);
    max-width: 432px;
}

/* Admin Styles (Desktop + Mobile) */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.admin-card {
    background: var(--secondary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 0.875rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.admin-table th {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.action-btns {
    display: flex;
    gap: 0.5rem;
}

.action-btns .btn {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

.stat-card {
    background: var(--primary);
    color: var(--secondary);
    padding: 1.5rem;
    border-radius: var(--radius);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Hide elements */
.hidden {
    display: none !important;
}
