/* Screenshot Viewer - Light Theme */

/* CSS Variables for theming */
:root {
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    --bg-card: #ffffff;
    --bg-hover: #e9ecef;

    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #868e96;

    --accent-primary: #9D2276;
    --accent-secondary: #b52d8a;
    --accent-gradient: linear-gradient(135deg, #9D2276 0%, #c73a9e 100%);

    --success: #2f9e44;
    --success-light: #37b24d;
    --warning: #f59e0b;
    --danger: #e03131;

    --border-color: #dee2e6;
    --border-light: #e9ecef;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Header */
.main-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo-link:hover .logo {
    opacity: 0.85;
}

.current-domain {
    background: var(--bg-tertiary);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.domain-select {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.domain-select:hover {
    border-color: var(--accent-primary);
}

.domain-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.user-info {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.user-dropdown-btn:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
}

.user-avatar {
    width: 28px;
    height: 28px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.dropdown-arrow {
    color: var(--text-muted);
    transition: var(--transition);
}

.user-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
    overflow: hidden;
}

.user-dropdown.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.dropdown-item svg {
    color: var(--text-muted);
}

.dropdown-item:hover svg {
    color: var(--accent-primary);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(157, 34, 118, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(157, 34, 118, 0.4);
}

.btn-secondary {
    background: var(--success);
    color: white;
    box-shadow: 0 4px 15px rgba(47, 158, 68, 0.25);
}

.btn-secondary:hover {
    background: var(--success-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(47, 158, 68, 0.35);
}

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

.btn-danger:hover {
    background: #c92a2a;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 64px);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.login-card {
    background: var(--bg-card);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    border: 1px solid var(--border-color);
}

.login-card h2 {
    margin-bottom: 8px;
    font-size: 1.75rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(157, 34, 118, 0.1);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.error-message {
    background: rgba(224, 49, 49, 0.08);
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid rgba(224, 49, 49, 0.2);
}

/* Domain Selection */
.domain-select-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.domain-select-card {
    background: var(--bg-card);
    padding: 48px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 500px;
    border: 1px solid var(--border-color);
}

.domain-select-card h2 {
    margin-bottom: 8px;
    font-size: 1.75rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.domain-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.domain-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.domain-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.domain-item:hover {
    background: var(--bg-hover);
    border-color: var(--accent-primary);
    transform: translateX(4px);
}

.domain-name {
    font-weight: 500;
    color: var(--text-primary);
}

.domain-arrow {
    color: var(--accent-primary);
    font-size: 1.2rem;
}

.no-domains {
    text-align: center;
    color: var(--text-secondary);
    padding: 32px;
}

/* Gallery Layout */
.gallery-container {
    display: flex;
    min-height: calc(100vh - 64px);
}

.date-sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 24px;
    overflow-y: auto;
    position: sticky;
    top: 64px;
    height: calc(100vh - 64px);
}

.date-sidebar h3 {
    margin-bottom: 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-main {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    background: var(--bg-primary);
}

/* Date Tree */
.date-tree {
    font-size: 0.9rem;
}

.tree-node {
    margin-bottom: 4px;
}

.tree-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    color: var(--text-secondary);
}

.tree-header:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.tree-header.selected {
    background: var(--accent-primary);
    color: white;
}

.tree-toggle {
    font-size: 0.65rem;
    width: 16px;
    opacity: 0.6;
}

.tree-label {
    flex: 1;
}

.tree-count {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.tree-header:hover .tree-count {
    background: var(--bg-hover);
}

.tree-header.selected .tree-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

.tree-children {
    padding-left: 20px;
    margin-top: 4px;
}

.tree-leaf {
    padding-left: 24px;
}

.year-node > .tree-header {
    font-weight: 600;
    color: var(--text-primary);
}

.month-node > .tree-header {
    font-weight: 500;
}

/* Filters */
.gallery-filters {
    background: var(--bg-card);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-input,
.filter-select {
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
    min-width: 160px;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(157, 34, 118, 0.1);
}

.filter-select option {
    background: var(--bg-secondary);
}

/* Screenshot Grid */
.screenshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.screenshot-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.screenshot-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.screenshot-thumb {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: var(--bg-tertiary);
    position: relative;
}

.screenshot-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.3));
    opacity: 0;
    transition: var(--transition);
}

.screenshot-card:hover .screenshot-thumb::after {
    opacity: 1;
}

.screenshot-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.screenshot-card:hover .screenshot-thumb img {
    transform: scale(1.05);
}

.screenshot-info {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    flex: 1;
}

.screenshot-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.screenshot-comment {
    font-size: 0.8rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 4px;
}

.screenshot-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.screenshot-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.screenshot-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.btn-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.btn-icon svg {
    width: 16px;
    height: 16px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
    padding: 24px 0;
}

.page-btn {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.page-btn:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.page-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: transparent;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

#modal-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.modal-info {
    padding: 24px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.modal-info p {
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.modal-info strong {
    color: var(--text-primary);
}

.modal-info a {
    color: var(--accent-primary);
    text-decoration: none;
}

.modal-info a:hover {
    text-decoration: underline;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.modal-actions .btn {
    color: white;
    text-decoration: none;
}

.modal-actions .btn:hover {
    color: white;
    text-decoration: none;
}

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

/* Utilities */
.loading {
    text-align: center;
    padding: 60px;
    color: var(--text-secondary);
}

.loading::before {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    margin: 0 auto 16px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.error {
    text-align: center;
    padding: 60px;
    color: var(--danger);
}

.no-data,
.no-screenshots {
    text-align: center;
    padding: 80px 40px;
    color: var(--text-muted);
}

.no-screenshots::before {
    content: '📷';
    display: block;
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-container {
        flex-direction: column;
    }

    .date-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: 300px;
    }

    .gallery-filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-input,
    .filter-select {
        width: 100%;
    }

    .header-nav {
        gap: 8px;
    }

    .domain-select {
        max-width: 120px;
    }

    .screenshot-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin Settings Page */
.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

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

.admin-header h2 {
    margin: 0;
    font-size: 1.75rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: var(--bg-tertiary);
    padding: 6px;
    border-radius: var(--radius-md);
    width: fit-content;
    border: 1px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.tab-btn.active {
    color: white;
    background: var(--accent-gradient);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Settings Card */
.settings-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.settings-card h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 1.25rem;
}

.settings-description {
    color: var(--text-secondary);
    margin-bottom: 28px;
}

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

.card-header h3 {
    margin: 0;
}

/* Settings Form */
.settings-form .form-group {
    margin-bottom: 24px;
}

.settings-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.settings-form input[type="text"],
.settings-form input[type="url"],
.settings-form input[type="password"],
.settings-form select {
    width: 100%;
    max-width: 500px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

.settings-form input:focus,
.settings-form select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(157, 34, 118, 0.1);
}

.form-help {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.form-actions {
    margin-top: 28px;
    display: flex;
    gap: 12px;
}

/* Info Box */
.info-box {
    background: rgba(157, 34, 118, 0.05);
    border: 1px solid rgba(157, 34, 118, 0.15);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-top: 32px;
}

.info-box h4 {
    margin: 0 0 12px 0;
    color: var(--accent-primary);
    font-size: 1rem;
}

.info-box p {
    color: var(--text-secondary);
}

.info-box ul {
    margin: 12px 0 0 0;
    padding-left: 20px;
    color: var(--text-secondary);
}

.info-box li {
    margin-bottom: 10px;
}

.info-box code {
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--accent-primary);
}

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

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

.data-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table th:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.data-table th:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.data-table td {
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: var(--bg-tertiary);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.badge-admin {
    background: rgba(47, 158, 68, 0.12);
    color: var(--success);
}

/* Modal Form */
.modal-form {
    padding: 32px;
    min-width: 420px;
    background: var(--bg-card);
}

.modal-form h3 {
    margin: 0 0 24px 0;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-form input[type="text"],
.modal-form input[type="password"],
.modal-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: var(--transition);
}

.modal-form input:focus,
.modal-form select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(157, 34, 118, 0.1);
}

.modal-form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: var(--accent-primary);
}

.modal-form .form-actions {
    margin-top: 28px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Empty state for tables */
.data-table tbody tr.empty-row td {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

/* Test Screenshot Feature */
.form-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.form-row .form-group {
    flex: 1;
    max-width: 200px;
}

.settings-form input[type="number"] {
    width: 100%;
    max-width: 200px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: var(--transition);
}

.settings-form input[type="number"]:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(157, 34, 118, 0.1);
}

.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loading::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.test-screenshot-result {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.test-screenshot-result h4 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.test-screenshot-preview {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    max-height: 600px;
    overflow: auto;
}

.test-screenshot-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
}

.test-screenshot-actions {
    display: flex;
    gap: 12px;
}

.test-screenshot-actions .btn {
    text-decoration: none;
}

.error-box {
    background: rgba(224, 49, 49, 0.08);
    color: var(--danger);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    margin-top: 20px;
    border: 1px solid rgba(224, 49, 49, 0.2);
}

.error-box strong {
    color: var(--danger);
}
