/* StreamXBox Admin Panel - Stylesheet */

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

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

/* ===== Login Page ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f1923 0%, #1a2a3a 100%);
}

.login-card {
    background: #1e2d3d;
    border-radius: 16px;
    padding: 48px 40px;
    width: 400px;
    max-width: 90vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    text-align: center;
}

.login-title {
    color: #00bfff;
    font-size: 28px;
    margin-bottom: 4px;
}

.login-subtitle {
    color: #8899aa;
    font-size: 14px;
    margin-bottom: 32px;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    color: #8899aa;
    font-size: 13px;
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    background: #0f1923;
    border: 1px solid #2a3a4a;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #00bfff;
}

.form-group input::placeholder {
    color: #556677;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #00bfff, #0080ff);
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00d4ff, #0090ff);
    transform: translateY(-1px);
}

.btn-danger {
    background: #ff4757;
    color: #fff;
}

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

.btn-success {
    background: #2ed573;
    color: #fff;
}

.btn-success:hover {
    background: #4ade80;
}

.btn-outline {
    background: transparent;
    border: 1px solid #2a3a4a;
    color: #8899aa;
}

.btn-outline:hover {
    border-color: #00bfff;
    color: #00bfff;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-icon {
    padding: 6px 10px;
    font-size: 13px;
    margin: 0 2px;
}

.error-text {
    color: #ff4757;
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
}

/* ===== Dashboard ===== */
.dashboard {
    padding: 0 24px 24px;
}

/* ===== Top Nav ===== */
.top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #1e2d3d;
    margin-bottom: 24px;
}

.brand {
    color: #00bfff;
    font-size: 22px;
}

.brand-sub {
    color: #8899aa;
    font-weight: 400;
    font-size: 16px;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-name {
    color: #8899aa;
    font-size: 14px;
}

/* ===== Stats ===== */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #1e2d3d;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border-left: 4px solid #00bfff;
}

.stat-card.stat-green { border-left-color: #2ed573; }
.stat-card.stat-red { border-left-color: #ff4757; }
.stat-card.stat-blue { border-left-color: #3498db; }
.stat-card.stat-purple { border-left-color: #9b59b6; }

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 13px;
    color: #8899aa;
    margin-top: 4px;
}

/* ===== Panel ===== */
.panel {
    background: #1e2d3d;
    border-radius: 12px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #2a3a4a;
    flex-wrap: wrap;
    gap: 12px;
}

.panel-header h3 {
    color: #fff;
    font-size: 18px;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-input {
    padding: 8px 14px;
    background: #0f1923;
    border: 1px solid #2a3a4a;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 13px;
    width: 300px;
    outline: none;
}

.search-input:focus {
    border-color: #00bfff;
}

.search-input::placeholder {
    color: #556677;
}

/* ===== Table ===== */
.table-wrapper {
    overflow-x: auto;
}

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

.device-table th {
    background: #162636;
    color: #8899aa;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 14px;
    text-align: left;
    white-space: nowrap;
}

.device-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #1a2a3a;
    font-size: 13px;
    color: #c0c0c0;
}

.device-table tbody tr:hover {
    background: #162636;
}

.loading-text {
    text-align: center;
    color: #556677;
    padding: 40px !important;
}

/* Status badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-active {
    background: rgba(46, 213, 115, 0.15);
    color: #2ed573;
}

.badge-inactive {
    background: rgba(255, 71, 87, 0.15);
    color: #ff4757;
}

.badge-mac {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

.badge-android {
    background: rgba(155, 89, 182, 0.15);
    color: #9b59b6;
}

/* ===== Pagination ===== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    gap: 8px;
}

.pagination button {
    padding: 6px 12px;
    background: #0f1923;
    border: 1px solid #2a3a4a;
    border-radius: 6px;
    color: #8899aa;
    cursor: pointer;
    font-size: 13px;
}

.pagination button:hover {
    border-color: #00bfff;
    color: #00bfff;
}

.pagination button.active {
    background: #00bfff;
    border-color: #00bfff;
    color: #fff;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== Modal ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}

.modal-content {
    position: relative;
    background: #1e2d3d;
    border-radius: 16px;
    padding: 32px;
    width: 480px;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-content h3 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 20px;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .search-input {
        width: 100%;
    }
    .panel-actions {
        width: 100%;
    }
}
