/* ===================================
   Landing Admin Panel - Modern Design
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=DM+Sans:wght@400;500;700&display=swap');

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #ec4899;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --dark-border: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-card: 0 10px 40px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ===================================
   LOGIN PAGE
   =================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e293b 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: pulse 4s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.2) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation: pulse 5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.7; }
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.login-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 48px 40px;
    box-shadow: var(--shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gradient-1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-form .form-control {
    width: 100%;
    padding: 14px 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--dark-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition);
}

.login-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.login-form .btn-primary {
    width: 100%;
    padding: 16px;
    background: var(--gradient-1);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 32px;
}

.login-form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.login-form .btn-primary:active {
    transform: translateY(0);
}

.btn-arrow {
    font-size: 20px;
    transition: var(--transition);
}

.login-form .btn-primary:hover .btn-arrow {
    transform: translateX(5px);
}

.alert-modern {
    border-radius: 12px;
    border: none;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: 14px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* ===================================
   NAVBAR
   =================================== */

.navbar-custom {
    background: var(--dark-card);
    border-bottom: 1px solid var(--dark-border);
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 22px;
    color: var(--text-primary) !important;
    text-decoration: none;
    transition: var(--transition);
}

.brand-icon {
    font-size: 28px;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand:hover {
    transform: translateY(-2px);
}

.navbar-text {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-text i {
    font-size: 20px;
}

/* ===================================
   SIDEBAR
   =================================== */

.main-container {
    padding-top: 20px;
}

.sidebar {
    background: var(--dark-card);
    min-height: calc(100vh - 100px);
    padding: 20px 10px;
    border-right: 1px solid var(--dark-border);
}

.sidebar .nav-link {
    color: var(--text-secondary);
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link i {
    font-size: 20px;
}

.sidebar .nav-link:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.sidebar .nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: white;
    border-radius: 0 4px 4px 0;
}

/* ===================================
   CONTENT AREA
   =================================== */

.content-area {
    padding: 20px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    margin-bottom: 32px;
    position: relative;
}

.content-header h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-header h2 i {
    color: var(--primary-color);
}

.content-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

.content-header .btn {
    position: absolute;
    right: 0;
    top: 0;
}

/* ===================================
   CARDS
   =================================== */

.card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 16px;
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: rgba(99, 102, 241, 0.3);
}

.template-card,
.prod-card,
.server-card {
    height: 100%;
}

.template-icon,
.prod-icon,
.server-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.template-icon i,
.prod-icon i,
.server-icon i {
    font-size: 28px;
    color: white;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.card-text {
    margin-bottom: 16px;
}

.server-info p {
    font-size: 14px;
    color: var(--text-secondary);
}

.server-info strong {
    color: var(--text-primary);
}

/* ===================================
   BUTTONS
   =================================== */

.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-primary);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
}

.btn-outline-secondary {
    border: 2px solid var(--dark-border);
    color: var(--text-secondary);
}

.btn-outline-secondary:hover {
    background: rgba(148, 163, 184, 0.1);
}

.btn-secondary {
    background: var(--dark-border);
    color: var(--text-primary);
}

/* ===================================
   BADGES
   =================================== */

.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bg-success {
    background: var(--success-color) !important;
}

.bg-warning {
    background: var(--warning-color) !important;
}

/* ===================================
   MODALS
   =================================== */

.modal-content {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
}

.modal-header {
    border-bottom: 1px solid var(--dark-border);
    padding: 24px;
}

.modal-title {
    font-size: 22px;
    font-weight: 700;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--dark-border);
    padding: 20px 24px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-control {
    background: rgba(15, 23, 42, 0.6);
    border: 2px solid var(--dark-border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 10px;
    transition: var(--transition);
}

.form-control:focus {
    background: rgba(15, 23, 42, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
    color: var(--text-primary);
}

.form-text {
    color: var(--text-secondary);
    font-size: 13px;
}

.code-editor {
    font-family: 'Space Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    background: rgba(15, 23, 42, 0.9) !important;
    border: 2px solid var(--dark-border) !important;
    color: #e2e8f0 !important;
}

.code-editor:focus {
    border-color: var(--primary-color) !important;
}

.btn-close {
    filter: invert(1);
    opacity: 0.7;
}

.btn-close:hover {
    opacity: 1;
}

/* ===================================
   NOTIFICATIONS
   =================================== */

.notification-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-card);
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--dark-border);
    }
    
    .content-header h2 {
        font-size: 24px;
    }
    
    .content-header .btn {
        position: static;
        margin-top: 16px;
        width: 100%;
    }
    
    .notification-alert {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

/* ===================================
   UTILITIES
   =================================== */

.text-muted {
    color: var(--text-secondary) !important;
}

.spinner-border {
    color: var(--primary-color);
}