/* Skywave Admin - Shared Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    min-height: 100vh;
}

/* Main Layout */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.page-content {
    flex: 1;
    padding: 24px 0;
}

/* Header */
header {
    background: #0a0a0f;
    border-bottom: 1px solid #1a1a2a;
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

header .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

header .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 13px;
    flex-shrink: 0;
}

header h1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

header .badge {
    background: #6366f1;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 500;
}

header .badge.green { background: #10b981; }

/* Navigation */
.nav-links {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.15s;
}

.nav-links a:hover {
    color: #fff;
    background: #1a1a2a;
}

.nav-links a.active {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.nav-links a.logout {
    color: #ef4444;
}

.nav-links a.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

@media (max-width: 768px) {
    header {
        padding: 12px 16px;
    }

    header .header-inner {
        position: relative;
    }

    .menu-toggle {
        display: block !important;
    }

    .nav-links {
        display: none !important;
        position: absolute;
        top: calc(100% + 12px);
        left: -16px;
        right: -16px;
        background: #12121a;
        border: 1px solid #2a2a3a;
        border-radius: 12px;
        padding: 8px;
        flex-direction: column;
        gap: 2px;
        z-index: 200;
    }

    .nav-links.open {
        display: flex !important;
    }

    .nav-links a {
        padding: 14px 16px;
        border-radius: 8px;
        font-size: 0.95rem;
    }

    header h1 {
        font-size: 1rem;
    }

    .container {
        padding: 0 16px;
    }

    .page-content {
        padding: 16px 0;
    }
}

/* Cards */
.card {
    background: #12121a;
    border: 1px solid #1a1a2a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary { background: #3b82f6; color: white; }
.btn-primary:hover { background: #2563eb; }
.btn-danger { background: #ef4444; color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-secondary { background: #1a1a2a; color: #ccc; border: 1px solid #2a2a3a; }
.btn-secondary:hover { background: #252530; color: #fff; }
.btn-success { background: #22c55e; color: white; }
.btn-success:hover { background: #16a34a; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: #888;
    font-size: 0.85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: #0a0a0f;
    border: 1px solid #2a2a3a;
    border-radius: 8px;
    color: #fff;
    font-size: 0.9rem;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #444;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #1a1a2a;
}

.data-table th {
    color: #666;
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr:hover {
    background: rgba(255,255,255,0.02);
}

/* Badges */
.tag {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    background: #1a1a2a;
    color: #888;
}

.tag-blue { background: rgba(59,130,246,0.15); color: #60a5fa; }
.tag-green { background: rgba(34,197,94,0.15); color: #4ade80; }
.tag-yellow { background: rgba(234,179,8,0.15); color: #fbbf24; }
.tag-red { background: rgba(239,68,68,0.15); color: #f87171; }

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 300;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    overflow-y: auto;
}

.modal-overlay.active { display: flex; }

.modal {
    background: #12121a;
    border: 1px solid #2a2a3a;
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 500px;
}

.modal h2 {
    margin-bottom: 20px;
    font-size: 1.15rem;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #1a1a2a;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    background: #22c55e;
    color: white;
    border-radius: 10px;
    display: none;
    z-index: 400;
    font-size: 0.9rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.toast.error { background: #ef4444; }
.toast.active { display: block; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: #555;
}

.empty-state h3 {
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
}

/* Utility */
code {
    background: #1a1a2a;
    padding: 3px 8px;
    border-radius: 6px;
    font-family: 'SF Mono', Monaco, 'Consolas', monospace;
    font-size: 0.85em;
    color: #f472b6;
}

/* Lists */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #0a0a0f;
    border: 1px solid #1a1a2a;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: border-color 0.15s;
    cursor: pointer;
}

.list-item:hover {
    border-color: #2a2a3a;
}

.list-item.active {
    border-color: #3b82f6;
    background: rgba(59,130,246,0.05);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .grid-2, .grid-3 {
        grid-template-columns: 1fr;
    }

    .modal {
        padding: 20px;
        border-radius: 12px;
    }

    .modal-overlay {
        padding: 20px 16px;
        align-items: flex-start;
    }

    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 10px 8px;
    }
}

/* Sidebar Layout */
.layout-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (max-width: 900px) {
    .layout-sidebar {
        grid-template-columns: 1fr;
    }
}

/* Page Title */
.page-title {
    margin-bottom: 24px;
}

.page-title h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
}

.page-title p {
    color: #666;
    font-size: 0.9rem;
}
