/* MAN System - Professional Full-Screen Management Interface */
/* Shared CSS Foundation for All Pages */

* {
    box-sizing: border-box;
}

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; 
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    margin: 0; 
    padding: 0; 
    color: #2c3e50;
    line-height: 1.5;
    min-height: 100vh;
}

.header { 
    background: linear-gradient(135deg, #1a252f 0%, #2c3e50 100%);
    color: #ecf0f1; 
    padding: 18px 30px; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #34495e;
}

.header h1 { 
    margin: 0; 
    font-size: 24px; 
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header .badges {
    margin-top: 8px;
}

.badge { 
    background: #5a6c7d; 
    color: #ecf0f1; 
    padding: 3px 8px; 
    border-radius: 3px; 
    font-size: 10px; 
    margin-right: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.success { background: #27ae60; }
.badge.warning { background: #f39c12; color: #fff; }
.badge.danger { background: #e74c3c; }
.badge.info { background: #3498db; }

.nav { 
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 30px; 
    border-bottom: 1px solid rgba(0,0,0,0.1);
    position: sticky;
    top: 66px;
    z-index: 99;
    backdrop-filter: blur(10px);
}

.nav a { 
    margin-right: 8px; 
    padding: 8px 16px; 
    background: #95a5a6; 
    color: white; 
    text-decoration: none; 
    border-radius: 4px; 
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav a:hover { 
    background: #7f8c8d; 
    transform: translateY(-1px);
}

.nav a.active { 
    background: #2c3e50; 
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.3);
}

.nav a.automation-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: pulse-automation 2s infinite;
}

.nav a.automation-link:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

@keyframes pulse-automation {
    0% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(102, 126, 234, 0); }
    100% { box-shadow: 0 0 0 0 rgba(102, 126, 234, 0); }
}

.container {
    max-width: none;
    margin: 0;
    padding: 30px;
    min-height: calc(100vh - 120px);
}

.section {
    background: rgba(255, 255, 255, 0.98);
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.section-header {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: #ecf0f1;
    padding: 15px 24px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.section-content {
    padding: 24px;
}

/* Compact Item Styles */
.item {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s;
    font-size: 13px;
}

.item:last-child {
    border-bottom: none;
}

.item:hover {
    background: #f8f9fa;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-title {
    font-weight: 600;
    color: #495057;
}

.item-meta {
    font-size: 11px;
    color: #6c757d;
}

.item-status {
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 500;
}

.item-status.verified { background: #d4edda; color: #155724; }
.item-status.pending { background: #fff3cd; color: #856404; }
.item-status.error { background: #f8d7da; color: #721c24; }
.item-status.restricted { background: #f8d7da; color: #721c24; }

/* Account Status Classes */
.status-verified { background: #28a745; color: white; }
.status-pending { background: #ffc107; color: #212529; }
.status-awaiting { background: #17a2b8; color: white; }
.status-restricted { background: #dc3545; color: white; animation: pulse 2s infinite; }
.status-needs-reauth { background: #fd7e14; color: white; animation: pulse 2s infinite; }
.status-session-error { background: #6f42c1; color: white; }
.status-flood-wait { background: #f44336; color: white; animation: pulse 2s infinite; }
.status-needs-password { background: #4caf50; color: white; animation: pulse 2s infinite; }

/* Pulse animation for restricted accounts */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.item-details {
    margin-top: 8px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 3px;
    display: none;
    font-size: 12px;
}

.item-details.expanded {
    display: block;
}

.expand-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 4px;
}

.expand-btn:hover {
    text-decoration: underline;
}

/* Form Controls */
.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 12px;
    color: #495057;
}

.form-control {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 13px;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* Buttons */
.btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    margin-right: 4px;
    margin-bottom: 4px;
    display: inline-block;
    text-decoration: none;
}

.btn:hover {
    background: #0056b3;
}

.btn.success { background: #28a745; }
.btn.success:hover { background: #1e7e34; }

.btn.danger { background: #dc3545; }
.btn.danger:hover { background: #c82333; }

.btn.secondary { background: #6c757d; }
.btn.secondary:hover { background: #545b62; }

.btn.small {
    padding: 3px 6px;
    font-size: 10px;
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* Legacy box support for consistent padding */
.box {
    background: rgba(255, 255, 255, 0.98);
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 24px;
}

.box h3 {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: #ecf0f1;
    padding: 15px 24px;
    margin: -24px -24px 20px -24px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px 6px 0 0;
}

/* Utilities */
.text-muted { color: #6c757d; }
.text-small { font-size: 11px; }
.text-center { text-align: center; }
.mt-2 { margin-top: 8px; }
.mb-2 { margin-bottom: 8px; }
.p-2 { padding: 8px; }

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 4px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #6c757d;
}

.close:hover {
    color: #000;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 12px;
    }
    
    .nav {
        padding: 8px 12px;
    }
    
    .nav a {
        margin-right: 8px;
        margin-bottom: 4px;
    }
}

/* Loading States */
.loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-size: 12px;
}

.error {
    color: #dc3545;
    text-align: center;
    padding: 12px;
    font-size: 12px;
}

/* Filters */
.filter-bar {
    background: #f8f9fa;
    padding: 12px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-label {
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    min-width: 60px;
}

.filter-select {
    padding: 4px 6px;
    border: 1px solid #ced4da;
    border-radius: 3px;
    font-size: 11px;
}
