/* ================================
   AndroRAT Web Panel - Main Styles
   ================================ */

:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --sidebar-width: 260px;
    --sidebar-bg: #1a252f;
    --sidebar-hover: #22303d;
    --topbar-height: 70px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* ================================
   Container & Layout
   ================================ */

.container {
    display: flex;
    min-height: 100vh;
}

/* ================================
   Sidebar
   ================================ */

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 1000;
}

.logo {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.logo h2 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.logo .version {
    font-size: 0.8rem;
    color: #95a5a6;
}

.nav-menu {
    padding: 20px 0;
}

.nav-item {
    display: block;
    padding: 15px 25px;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.nav-item:hover,
.nav-item.active {
    background: var(--sidebar-hover);
    border-left-color: var(--secondary-color);
    color: white;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 20px;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

.sidebar-footer .warning {
    color: var(--warning-color);
    margin-top: 5px;
    font-weight: bold;
}

/* ================================
   Main Content
   ================================ */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    background: #f5f7fa;
}

.top-bar {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar h1 {
    font-size: 1.8rem;
    color: var(--dark-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-online {
    background: #d4edda;
    color: #155724;
}

.status-offline {
    background: #f8d7da;
    color: #721c24;
}

.status-badge i {
    font-size: 0.7rem;
    margin-right: 5px;
}

.content-area {
    padding: 30px;
}

/* ================================
   Cards
   ================================ */

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.card-header h2 {
    font-size: 1.3rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-body {
    padding: 25px;
}

/* ================================
   Stats Grid
   ================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.stat-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-icon.green { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.stat-icon.orange { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.stat-icon.red { background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%); }

.stat-info h3 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-info p {
    color: #6c757d;
    font-size: 0.9rem;
}

/* ================================
   Buttons
   ================================ */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

.btn i {
    margin-right: 5px;
}

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

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

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

.btn-success:hover {
    background: #27ae60;
}

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

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

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

.btn-warning:hover {
    background: #d68910;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-large {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.85rem;
}

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

/* ================================
   Forms
   ================================ */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
}

.form-group label i {
    margin-right: 5px;
    color: var(--primary-color);
}

.required {
    color: var(--danger-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.85rem;
}

.form-options {
    margin-bottom: 25px;
}

.checkbox-group {
    margin-bottom: 15px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-label span {
    font-weight: 500;
}

.form-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* ================================
   Tables
   ================================ */

.table-responsive {
    overflow-x: auto;
}

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

.table thead {
    background: #f8f9fa;
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid #dee2e6;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table .actions {
    display: flex;
    gap: 5px;
}

/* ================================
   Badges
   ================================ */

.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-secondary {
    background: #e2e3e5;
    color: #383d41;
}

/* ================================
   Alerts
   ================================ */

.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* ================================
   Server Controls
   ================================ */

.server-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.terminal-output {
    background: #1a252f;
    color: #00ff00;
    padding: 20px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.9rem;
}

.terminal-output .text-muted {
    color: #6c757d;
}

/* ================================
   Quick Actions
   ================================ */

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    text-align: center;
}

.action-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(102, 126, 234, 0.3);
}

.action-btn i {
    font-size: 2rem;
}

/* ================================
   Instructions
   ================================ */

.instructions {
    line-height: 1.8;
}

.instructions h3 {
    color: var(--dark-color);
    margin: 20px 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions ol {
    margin-left: 25px;
    margin-bottom: 20px;
}

.instructions li {
    margin-bottom: 10px;
}

.instructions code {
    background: #f8f9fa;
    padding: 3px 8px;
    border-radius: 3px;
    color: #e74c3c;
    font-family: monospace;
}

.warning-box {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    margin-top: 20px;
    border-radius: 5px;
}

.warning-box i {
    color: #ffc107;
    margin-right: 10px;
}

/* ================================
   Progress Bar
   ================================ */

.progress-container {
    margin: 20px 0;
}

.progress-bar {
    height: 30px;
    background: #e9ecef;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.3s;
    animation: progress-animation 2s infinite;
}

@keyframes progress-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#progress-text {
    text-align: center;
    color: var(--dark-color);
    font-weight: 500;
}

/* ================================
   Activity List
   ================================ */

.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.log-entry {
    padding: 10px;
    border-left: 3px solid;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 3px;
}

.log-success { border-color: var(--secondary-color); }
.log-error { border-color: var(--danger-color); }
.log-info { border-color: var(--info-color); }
.log-warning { border-color: var(--warning-color); }

.log-time {
    font-family: monospace;
    color: #6c757d;
    font-size: 0.85rem;
}

/* ================================
   Utilities
   ================================ */

.text-muted {
    color: #6c757d !important;
}

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

.mb-0 { margin-bottom: 0 !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mt-20 { margin-top: 20px !important; }

/* ================================
   Responsive
   ================================ */

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 15px;
    }
    
    .server-controls {
        flex-direction: column;
    }
    
    .table {
        font-size: 0.85rem;
    }
}

/* ================================
   Loading Animation
   ================================ */

.spinner {
    border: 3px solid #f3f3f3;
    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); }
}