/* GhostWare Admin Panel - Standalone CSS */
:root {
    --dark-50: #f8fafc;
    --dark-100: #f1f5f9;
    --dark-200: #e2e8f0;
    --dark-300: #cbd5e1;
    --dark-400: #94a3b8;
    --dark-500: #64748b;
    --dark-600: #475569;
    --dark-700: #334155;
    --dark-800: #1e293b;
    --dark-900: #0f172a;
    --dark-950: #020617;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--dark-950);
    color: #f1f5f9;
    min-height: 100vh;
    line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark-800); }
::-webkit-scrollbar-thumb { background: var(--dark-600); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--dark-500); }

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.flex-1 { flex: 1; }
.flex-col { flex-direction: column; }
.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.max-w-md { max-width: 28rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.ml-64 { margin-left: 16rem; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-mono { font-family: 'Monaco', 'Consolas', monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.max-h-80 { max-height: 20rem; }
.min-w-0 { min-width: 0; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.divide-y > * + * { border-top: 1px solid rgba(51, 65, 85, 0.5); }
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-1\/2 { top: 50%; }
.left-3 { left: 0.75rem; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.z-50 { z-index: 50; }
.cursor-pointer { cursor: pointer; }

/* Colors */
.text-white { color: #ffffff; }
.text-gray-100 { color: #f3f4f6; }
.text-dark-300 { color: var(--dark-300); }
.text-dark-400 { color: var(--dark-400); }
.text-dark-500 { color: var(--dark-500); }
.text-indigo-400 { color: #818cf8; }
.text-purple-400 { color: #a78bfa; }
.text-green-400 { color: #4ade80; }
.text-red-400 { color: #f87171; }
.text-yellow-400 { color: #facc15; }
.text-cyan-400 { color: #22d3ee; }

.bg-dark-800 { background-color: var(--dark-800); }
.bg-dark-900 { background-color: var(--dark-900); }
.bg-dark-950 { background-color: var(--dark-950); }

/* Borders */
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-r { border-right-width: 1px; }
.border-dark-600 { border-color: var(--dark-600); }
.border-dark-700 { border-color: var(--dark-700); }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #7c3aed 100%);
    transform: scale(1.02);
}

.btn-secondary {
    background-color: var(--dark-800);
    color: var(--dark-300);
    border: 1px solid var(--dark-600);
}

.btn-secondary:hover {
    background-color: var(--dark-700);
    color: white;
}

.btn-danger {
    background-color: #dc2626;
    border-color: #b91c1c;
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
    border-color: #991b1b;
}

.input {
    width: 100%;
    background-color: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--dark-600);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: white;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.input::placeholder {
    color: var(--dark-400);
}

.input-icon {
    padding-left: 2.5rem;
}

.select {
    background-color: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--dark-600);
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    color: white;
    font-size: 0.875rem;
}

.select:focus {
    outline: none;
    border-color: var(--accent);
}

/* Cards */
.card {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1rem;
    padding: 1.5rem;
}

/* Sidebar */
.sidebar {
    width: 16rem;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(12px);
    border-right: 1px solid rgba(51, 65, 85, 0.5);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    color: var(--dark-300);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background-color: rgba(30, 41, 59, 0.5);
    color: white;
}

.sidebar-link.active {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, transparent 100%);
    border-left: 3px solid var(--accent);
    color: white;
}

/* Table */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    background-color: rgba(30, 41, 59, 0.5);
    color: var(--dark-300);
    font-weight: 500;
    font-size: 0.875rem;
}

td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
}

tbody tr {
    border-top: 1px solid rgba(51, 65, 85, 0.5);
}

tbody tr:hover {
    background-color: rgba(30, 41, 59, 0.3);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-green {
    background-color: rgba(74, 222, 128, 0.2);
    color: #4ade80;
}

.badge-red {
    background-color: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

.badge-yellow {
    background-color: rgba(250, 204, 21, 0.2);
    color: #facc15;
}

.badge-blue {
    background-color: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

.badge-purple {
    background-color: rgba(167, 139, 250, 0.2);
    color: #a78bfa;
}

.badge-indigo {
    background-color: rgba(129, 140, 248, 0.2);
    color: #818cf8;
}

/* Status Dot */
.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
}

.status-dot.green { background-color: #4ade80; }
.status-dot.red { background-color: #f87171; }
.status-dot.yellow { background-color: #facc15; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal {
    background-color: var(--dark-900);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1rem;
    width: 100%;
    max-width: 28rem;
    padding: 1.5rem;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    color: white;
    z-index: 100;
    animation: slideIn 0.3s ease;
}

.toast.success { background-color: #22c55e; }
.toast.error { background-color: #ef4444; }
.toast.info { background-color: var(--accent); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Glow Effect */
.glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Icon Containers */
.icon-box {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-box-lg {
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-box-xl {
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Icon alignment fix */
.icon-box-lg .icon,
.icon-box-lg [class^="icon-"],
.icon-box-lg [class*=" icon-"] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.icon-box-lg .icon::before,
.icon-box-lg [class^="icon-"]::before,
.icon-box-lg [class*=" icon-"]::before {
    display: block;
    text-align: center;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.icon-indigo { background-color: rgba(99, 102, 241, 0.2); color: #818cf8; }
.icon-green { background-color: rgba(74, 222, 128, 0.2); color: #4ade80; }
.icon-purple { background-color: rgba(167, 139, 250, 0.2); color: #a78bfa; }
.icon-cyan { background-color: rgba(34, 211, 238, 0.2); color: #22d3ee; }
.icon-yellow { background-color: rgba(250, 204, 21, 0.2); color: #facc15; }
.icon-red { background-color: rgba(248, 113, 113, 0.2); color: #f87171; }

/* Icon base styles */
.icon {
    display: inline-block;
    font-size: 1.25rem;
    line-height: 1;
    vertical-align: middle;
}

[class^="icon-"],
[class*=" icon-"] {
    display: inline-block;
    font-size: 1.25rem;
    line-height: 1;
    vertical-align: middle;
}

[class^="icon-"]::before,
[class*=" icon-"]::before {
    display: inline-block;
    font-size: inherit;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
}

/* Icon sizes in boxes */
.icon-box-lg .icon,
.icon-box-lg [class^="icon-"],
.icon-box-lg [class*=" icon-"] {
    font-size: 1.5rem;
}

/* Action Buttons */
.action-btn {
    padding: 0.5rem;
    color: var(--dark-400);
    background: transparent;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: rgba(30, 41, 59, 0.5);
}

.action-btn.hover-green:hover { color: #4ade80; }
.action-btn.hover-red:hover { color: #f87171; }
.action-btn.hover-yellow:hover { color: #facc15; }

/* Grid layouts */
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .lg\:grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .ml-64 { margin-left: 0; }
}

/* Ring */
.ring-active {
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.5);
}

/* Version Cards */
.version-card {
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 1rem;
    padding: 1.5rem;
}

.version-card.active {
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.5);
}

/* Checkbox */
input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 1px solid var(--dark-600);
    background-color: var(--dark-800);
    cursor: pointer;
}

input[type="checkbox"]:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

/* File Input */
input[type="file"] {
    color: var(--dark-400);
}

input[type="file"]::file-selector-button {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin-right: 1rem;
    cursor: pointer;
}

/* Date Input */
input[type="date"] {
    color-scheme: dark;
}

/* Textarea */
textarea {
    resize: none;
}

/* Code */
code {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.8125rem;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: var(--dark-800);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--dark-700);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    border-radius: 4px;
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}
