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

:root {
    --primary-color: #ff6b35;
    --secondary-color: #f7931e;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-hover: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --border-color: #2a2a2a;
    --easy-color: #00ff88;
    --medium-color: #ffa500;
    --hard-color: #ff4444;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 30px;
}

h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.social-links {
    position: absolute;
    right: 20px;
    top: 1rem;
    display: flex;
    gap: 1rem;
}

.social-icon {
    color: #555;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f0f0f0;
}

.social-icon:hover {
    color: #fff;
    background-color: #4a6cf7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

.progress-section {
    display: flex;
    gap: 60px;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
    flex-wrap: wrap;
}

.total-progress {
    text-align: center;
}

.total-progress h3 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-weight: 500;
}

.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
}

.progress-circle svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.progress-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 8;
}

.progress-bar {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.progress-count {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.difficulty-stats {
    display: flex;
    gap: 40px;
}

.diff-stat {
    text-align: center;
}

.diff-stat h4 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-weight: 500;
}

.diff-stat p {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    gap: 10px;
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

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

.control-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Sheet switcher (Official | Personal) */
.sheet-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 10px;
}

.sheet-switcher label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.sheet-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 32px 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23a0a0a0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

.sheet-select:hover {
    border-color: var(--text-secondary);
    background: var(--bg-hover);
}

.sheet-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
    outline: none;
}

.search-box {
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    min-width: 350px;
    transition: all 0.2s ease;
}

.search-box:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.search-box::placeholder {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.btn-add {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
}

.btn-reset {
    padding: 10px 20px;
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.topics-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.topic-section {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.topic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    user-select: none;
    background: var(--bg-card);
    transition: background 0.2s ease;
}

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

.topic-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.topic-progress {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.progress-bar-small {
    width: 100px;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.toggle-icon {
    font-size: 1rem;
    transition: transform 0.3s ease;
    color: var(--text-secondary);
}

.toggle-icon.collapsed {
    transform: rotate(-90deg);
}

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

.problems-table thead {
    background: var(--bg-dark);
}

.problems-table th {
    padding: 12px 20px;
    text-align: left;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.problems-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.problems-table tbody tr {
    transition: background 0.15s ease;
}

.problems-table tbody tr:hover {
    background: var(--bg-hover);
}

.problem-name {
    color: var(--text-primary);
    font-weight: 400;
}

.problem-link {
    text-decoration: none;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.problem-link:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

.platform-icon {
    font-size: 1rem;
}

.difficulty {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.difficulty.Easy {
    background: rgba(0, 255, 136, 0.15);
    color: var(--easy-color);
}

.difficulty.Medium {
    background: rgba(255, 165, 0, 0.15);
    color: var(--medium-color);
}

.difficulty.Hard {
    background: rgba(255, 68, 68, 0.15);
    color: var(--hard-color);
}

.company-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.company-tag {
    display: inline-block;
    padding: 3px 8px;
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.notes {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.notes-editable {
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 8px 28px 8px 8px;
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    cursor: text;
    min-height: 20px;
    transition: all 0.2s ease;
    word-wrap: break-word;
    outline: none;
    position: relative;
    background: var(--bg-dark);
}

.notes-editable::after {
    content: '✏️';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.notes-editable:hover {
    background: var(--bg-hover);
    border-color: var(--primary-color);
    border-style: solid;
}

.notes-editable:hover::after {
    opacity: 1;
}

.notes-editable:focus {
    background: var(--bg-dark);
    border-color: var(--primary-color);
    border-style: solid;
    color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 53, 0.1);
    padding-right: 8px;
}

.notes-editable:focus::after {
    display: none;
}

.notes-editable.notes-editing {
    border-color: var(--primary-color);
    border-style: solid;
    background: var(--bg-dark);
    color: var(--text-primary);
}

.notes-placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
    font-style: italic;
}

.status-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.status-select {
    padding: 6px 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

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

.status-select option {
    background: var(--bg-dark);
}

.hidden {
    display: none;
}

.collapsed-content {
    display: none;
}

/* Subsection Styles */
.subsection {
    margin: 15px 0;
    border-left: 3px solid var(--border-color);
    padding-left: 15px;
}

.subsection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--bg-hover);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 10px;
}

.subsection-header:hover {
    background: #333;
}

.subsection-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.subsection-progress {
    display: flex;
    align-items: center;
    gap: 10px;
}

.subsection-content {
    margin-left: 0;
}

.subsection .problems-table {
    margin-top: 0;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(8px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-card);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar for Modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Firefox Scrollbar */
.modal-content {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-dark);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--bg-dark);
}

/* Custom Scrollbar for Modal Body */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

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

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

.form-group:focus-within label {
    color: var(--primary-color);
}

.form-input {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
}

.form-input:hover:not(:focus) {
    border-color: var(--text-secondary);
}

.form-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

textarea.form-input {
    resize: vertical;
    min-height: 80px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.btn-cancel {
    padding: 10px 24px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    background: var(--bg-hover);
}

.btn-save {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-save:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* Google Sign-In Container */
#googleSignInContainer {
    min-height: 42px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 12px 0;
    padding: 8px 0;
}

#googleSignInContainer iframe {
    margin: 0 auto;
}

#googleSignInContainer > div {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ==================== AUTHENTICATION STYLES ==================== */

.auth-modal {
    max-width: 500px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

/* Auth Branding Section */
.auth-branding {
    text-align: center;
    padding: 30px 24px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.auth-logo {
    margin-bottom: 15px;
}

.logo-image {
    max-width: 80px;
    max-height: 80px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 8px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.auth-header {
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
    flex-shrink: 0;
}

.auth-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.auth-tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: -2px;
    position: relative;
}

.auth-tab-btn::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.auth-tab-btn:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.auth-tab-btn.active {
    color: var(--primary-color);
}

.auth-tab-btn.active::before {
    width: 100%;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

.btn-logout {
    padding: 10px 20px;
    background: var(--bg-hover);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.btn-admin {
    padding: 10px 20px;
    background: var(--success-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-admin:hover {
    background: #059669;
    transform: translateY(-1px);
}

/* ==================== ADMIN PANEL STYLES ==================== */

.admin-modal {
    max-width: 800px;
    max-height: 85vh;
}

.admin-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    flex: 1;
    background: var(--bg-dark);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: 700;
}

.stat-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.users-section {
    margin-top: 30px;
}

.users-section h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.user-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

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

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    gap: 20px;
}

.user-details {
    flex: 1;
}

.user-details h4 {
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.user-email {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.user-role {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.user-created {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin: 0;
}

.user-status {
    display: flex;
    align-items: center;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

.status-badge.inactive {
    background: rgba(107, 114, 128, 0.2);
    color: var(--text-secondary);
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-delete-user {
    padding: 8px 16px;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-delete-user:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.protected-user {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

/* Logs section */
.logs-section {
    margin-top: 30px;
}

.logs-section h3 {
    color: var(--text-primary);
    margin-bottom: 12px;
}

.logs-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.logs-hint {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.logs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.log-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.log-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.log-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.log-badge.logout {
    background: rgba(107, 114, 128, 0.2);
    color: var(--text-secondary);
}

.log-badge.signup {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.log-user {
    color: var(--text-primary);
    font-weight: 500;
}

.log-email {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.log-time {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Scrollbar styling for users list */
.users-list::-webkit-scrollbar {
    width: 8px;
}

.users-list::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 4px;
}

.users-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.users-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header {
        padding: 20px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 0.85rem;
    }
    
    .progress-section {
        flex-direction: column;
        gap: 30px;
    }
    
    .difficulty-stats {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .tabs {
        width: 100%;
        overflow-x: auto;
    }
    
    .control-buttons {
        width: 100%;
        flex-direction: column;
    }
    .sheet-switcher {
        width: 100%;
        justify-content: space-between;
    }
    .sheet-switcher .sheet-select {
        width: 60%;
    }
    
    .search-box {
        width: 100%;
    }
    
    .topic-header {
        padding: 15px;
    }
    
    .topic-title {
        font-size: 1rem;
    }
    
    .problems-table {
        font-size: 0.8rem;
    }
    
    .problems-table th,
    .problems-table td {
        padding: 10px 8px;
    }
    
    .company-tags {
        flex-direction: column;
    }
    
    .admin-stats {
        flex-direction: column;
    }
    
    .user-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    .user-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .auth-modal {
        max-width: 90%;
        margin: 20px;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
    
    .auth-subtitle {
        font-size: 0.85rem;
    }
    
    .logo-image {
        max-width: 60px;
        max-height: 60px;
    }
    
    .auth-branding {
        padding: 20px 16px 15px;
    }
}
