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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1d29 0%, #2d3748 100%);
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

/* Login Page */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-box {
    background: #2d3748;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #3b82f6;
}

.subtitle {
    color: #9ca3af;
    margin-bottom: 30px;
    font-size: 1.1em;
}

.login-form {
    margin-top: 30px;
}

.login-footer {
    margin-top: 20px;
}

.login-footer a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 0.9em;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Admin Container */
.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.admin-header h1 {
    font-size: 2em;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Dashboard */
.dashboard {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Panel */
.panel {
    background: #2d3748;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.panel h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #3b82f6;
    border-bottom: 2px solid #3b82f6;
    padding-bottom: 10px;
}

.panel h3 {
    font-size: 1.3em;
    margin-bottom: 15px;
    color: #60a5fa;
}

.panel-content {
    margin-top: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e5e7eb;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="file"] {
    width: 100%;
    padding: 12px;
    background: #1a1d29;
    border: 2px solid #374151;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-group input[type="color"] {
    width: 80px;
    height: 50px;
    border: 2px solid #374151;
    border-radius: 8px;
    cursor: pointer;
    background: #1a1d29;
}

.color-value {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 10px;
    background: #1a1d29;
    border-radius: 5px;
    font-family: monospace;
    font-size: 0.9em;
}

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

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #4b5563;
    color: white;
}

.btn-secondary:hover {
    background: #374151;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #065f46;
    border-left: 4px solid #10b981;
    color: #d1fae5;
}

.alert-error {
    background: #7f1d1d;
    border-left: 4px solid #ef4444;
    color: #fecaca;
}

.alert-warning {
    background: #78350f;
    border-left: 4px solid #f59e0b;
    color: #fde68a;
}

/* Banner Preview */
.current-banner {
    margin-bottom: 20px;
}

.preview-banner {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Apps List */
.apps-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.app-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #1a1d29;
    padding: 15px;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.app-item:hover {
    transform: translateX(5px);
}

.app-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #374151;
}

.app-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.app-item-info {
    flex-grow: 1;
}

.app-item-info h4 {
    font-size: 1.2em;
    margin-bottom: 5px;
    color: #60a5fa;
}

.app-item-info p {
    color: #9ca3af;
    font-size: 0.9em;
    margin: 2px 0;
}

.app-item-info small {
    color: #6b7280;
}

.app-item-actions {
    flex-shrink: 0;
}

.no-data {
    text-align: center;
    padding: 30px;
    color: #9ca3af;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-header {
        text-align: center;
        flex-direction: column;
    }
    
    .admin-header h1 {
        font-size: 1.5em;
    }
    
    .header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .panel {
        padding: 20px;
    }
    
    .panel h2 {
        font-size: 1.4em;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .app-item {
        flex-direction: column;
        text-align: center;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}
