/* TreasureMage Admin Shared Styles */
/* Modern design system for all admin pages */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-dark: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

/* Global Admin Styles */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-page-header {
    background: var(--primary-gradient);
    color: white;
    padding: 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    box-shadow: var(--shadow-lg);
}

.admin-page-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-page-header p {
    margin: 8px 0 0 0;
    opacity: 0.9;
    font-size: 14px;
}

/* Card Styles */
.admin-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-md);
    margin-bottom: 20px;
    transition: var(--transition);
}

.admin-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.admin-card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-card-body {
    color: var(--text-dark);
}

/* Navigation Grid */
.admin-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.admin-nav-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admin-nav-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
    text-decoration: none;
}

.admin-nav-card-icon {
    font-size: 36px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.admin-nav-card-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.admin-nav-card-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Button Styles */
.btn-admin {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-admin:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.btn-admin:active {
    transform: translateY(0);
}

.btn-admin-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-admin-secondary:hover {
    background: var(--bg-white);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-admin-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.btn-admin-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.btn-admin-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.btn-admin-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-admin-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Form Styles */
.admin-form-group {
    margin-bottom: 20px;
}

.admin-form-label {
    display: block;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.admin-form-input,
.admin-form-select,
.admin-form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
}

.admin-form-input:focus,
.admin-form-select:focus,
.admin-form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.admin-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.admin-form-help {
    display: block;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Checkbox Styles - Larger and easier to click */
.admin-container input[type="checkbox"],
.admin-card input[type="checkbox"],
.admin-form-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
    vertical-align: middle;
}

/* Improve checkbox container spacing for better clickability */
.admin-form-group input[type="checkbox"] {
    margin-right: 10px;
}

/* Add hover effect to checkboxes */
.admin-container input[type="checkbox"]:hover,
.admin-card input[type="checkbox"]:hover,
.admin-form-group input[type="checkbox"]:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Ensure labels next to checkboxes are also clickable */
.admin-form-group label {
    cursor: pointer;
    user-select: none;
}

/* Table Styles */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.admin-table thead {
    background: var(--primary-gradient);
    color: white;
}

.admin-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.admin-table td {
    padding: 14px 16px;
    border-top: 1px solid var(--border-color);
    color: var(--text-dark);
    font-size: 14px;
}

.admin-table tbody tr {
    transition: var(--transition);
}

.admin-table tbody tr:hover {
    background: var(--bg-light);
}

/* Status Badges */
.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.admin-badge-success {
    background: #d1fae5;
    color: #065f46;
}

.admin-badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.admin-badge-error {
    background: #fee2e2;
    color: #991b1b;
}

.admin-badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.admin-badge-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Alert Messages */
.admin-alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.admin-alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.admin-alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.admin-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.admin-alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Loading Spinner */
.admin-spinner {
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Stats Grid */
.admin-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.admin-stat-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
}

.admin-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.admin-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

/* Responsive */
@media (max-width: 768px) {
    .admin-nav-grid {
        grid-template-columns: 1fr;
    }

    .admin-stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .admin-page-header h1 {
        font-size: 24px;
    }
}

/* Utility Classes */
.admin-flex {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.admin-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.admin-mt-1 { margin-top: 8px; }
.admin-mt-2 { margin-top: 16px; }
.admin-mt-3 { margin-top: 24px; }
.admin-mb-1 { margin-bottom: 8px; }
.admin-mb-2 { margin-bottom: 16px; }
.admin-mb-3 { margin-bottom: 24px; }

.admin-text-center { text-align: center; }
.admin-text-muted { color: var(--text-muted); }
.admin-text-sm { font-size: 13px; }
.admin-text-lg { font-size: 16px; }
