/* Alumni Magazine Dashboard - Professional Styles */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --bg-dark: #1e1b4b;
    --bg-sidebar: #312e81;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
}

/* App Layout */
.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.logo-title {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
}

.logo-subtitle {
    display: block;
    font-size: 12px;
    color: var(--primary-light);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--primary-light);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 4px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-white);
}

.nav-item.active {
    background: var(--primary);
    color: var(--text-white);
}

.nav-icon {
    font-size: 18px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--danger);
}

.status-dot.online {
    background: var(--success);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 24px 32px;
    min-height: 100vh;
}

/* Page */
.page {
    display: none;
}

.page.active {
    display: block;
}

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

.page-header h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.stat-icon.blue { background: #dbeafe; }
.stat-icon.green { background: #d1fae5; }
.stat-icon.orange { background: #ffedd5; }
.stat-icon.purple { background: #ede9fe; }

.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

.stat-value.highlight {
    color: var(--success);
    font-size: 20px;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
}

.card-header h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 24px;
}

/* Forms */
.inline-form {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-main);
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

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

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

.btn-secondary {
    background: var(--bg-main);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border-light);
}

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

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

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

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

.btn-sm {
    padding: 8px 12px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Years List */
.years-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.year-item {
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    overflow: hidden;
}

.year-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-main);
    cursor: pointer;
    transition: all 0.2s;
}

.year-header:hover {
    background: var(--border-light);
}

.year-header h3 {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.year-badge {
    font-size: 13px;
    padding: 4px 12px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 20px;
    font-weight: 500;
}

.year-editions {
    display: none;
    padding: 8px;
    background: var(--bg-card);
}

.year-item.expanded .year-editions {
    display: block;
}

.edition-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.edition-item:hover {
    background: var(--bg-main);
}

.edition-name {
    font-weight: 500;
}

.edition-date {
    font-size: 12px;
    color: var(--text-light);
}

.edition-actions {
    display: flex;
    gap: 8px;
}

/* Loading */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
    gap: 12px;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.modal-large {
    max-width: 900px;
}

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

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-main);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.modal-toolbar {
    display: flex;
    gap: 10px;
    padding: 16px 24px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
    flex-shrink: 0;
}

.modal-stats {
    display: flex;
    gap: 20px;
    padding: 12px 24px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

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

.modal-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.modal-scroll-area {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

.modal-body {
    padding: 24px;
}

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

/* Folder Tree */
.folder-tree {
    font-size: 14px;
}

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

.tree-folder-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}

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

.tree-folder-header.section {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-dark);
}

.tree-toggle {
    width: 16px;
    font-size: 10px;
    color: var(--text-light);
}

.tree-children {
    margin-left: 20px;
    padding-left: 12px;
    border-left: 2px solid var(--border-light);
}

.tree-folder.collapsed > .tree-children {
    display: none;
}

.tree-file {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
    transition: all 0.2s;
}

.tree-file:hover {
    background: var(--bg-main);
}

.tree-file-name {
    flex: 1;
    color: var(--text-primary);
    text-decoration: none;
}

.tree-file-name:hover {
    color: var(--primary);
}

.file-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-gdoc {
    background: #4285f4;
    color: white;
}

.btn-review {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-review:hover {
    background: var(--primary-dark);
}

.btn-review.done {
    background: var(--success);
}

.btn-review:disabled {
    background: var(--text-light);
    cursor: not-allowed;
}

.file-meta {
    font-size: 11px;
    color: var(--text-light);
}

.review-status {
    font-size: 12px;
    margin-left: 8px;
}

.review-status.processing {
    color: var(--warning);
}

.review-status.success {
    color: var(--success);
}

.review-status.error {
    color: var(--danger);
}

/* Review Stepper */
.review-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--bg-main);
    gap: 8px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    transition: all 0.3s;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
}

.step-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
}

.step.active .step-icon {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.step.completed .step-icon {
    background: var(--success);
}

.step span {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.step-line {
    width: 40px;
    height: 2px;
    background: var(--border);
}

/* Success State */
.success-state {
    text-align: center;
    padding: 40px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.success-state h3 {
    font-size: 20px;
    color: var(--success);
    margin-bottom: 8px;
}

.success-state p {
    color: var(--text-secondary);
}

/* Reviewers Panel */
.reviewers-panel {
    display: none;
    padding: 20px 24px;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border-light);
}

.reviewers-panel.active {
    display: block;
}

.reviewers-panel h4 {
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
}

.reviewers-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 16px;
}

.reviewers-table th,
.reviewers-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.reviewers-table th {
    background: var(--bg-card);
    font-weight: 600;
    color: var(--text-secondary);
    position: sticky;
    top: 0;
}

.reviewers-table tbody {
    max-height: 300px;
    overflow-y: auto;
}

/* Result Message */
.result-message {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    display: none;
}

.result-message.success {
    display: block;
    background: #d1fae5;
    color: #065f46;
}

.result-message.error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
}

.toast {
    padding: 14px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    margin-bottom: 10px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    max-width: 400px;
    border-left: 4px solid var(--primary);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left-color: var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

.toast.warning {
    border-left-color: var(--warning);
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .logo-text,
    .nav-section-title,
    .nav-item span:last-child,
    .status-text {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .inline-form {
        flex-direction: column;
    }
    
    .modal-toolbar {
        flex-wrap: wrap;
    }
}

/* Email Status */
.email-status {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
}

.status-sending {
    background: #fef3c7;
    color: #92400e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-sending::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #92400e;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.status-success {
    background: #d1fae5;
    color: #065f46;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-warning ul {
    margin: 8px 0 0 20px;
    font-size: 12px;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Moved Files List */
.moved-files-list {
    margin: 8px 0 0 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    max-height: 150px;
    overflow-y: auto;
}

.moved-files-list li {
    padding: 4px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.moved-files-list li:last-child {
    border-bottom: none;
}

/* Success Button */
.btn-success {
    background: var(--success);
    color: var(--text-white);
}

.btn-success:hover {
    background: #059669;
}
