:root {
    --primary: #FF6B00;
    --secondary: #E65100;
    --bg-color: #F4F7FE;
    --sidebar-bg: #FFFFFF;
    --card-bg: #FFFFFF;
    --text-main: #2B3674;
    --text-muted: #A3AED0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.02);
}

.sidebar-header h2 {
    color: var(--primary);
    font-size: 24px;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-badge {
    background-color: rgba(255, 107, 0, 0.1);
    color: var(--secondary);
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    text-transform: uppercase;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 15px;
}

.sidebar-nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    display: block;
    padding: 12px 15px;
    border-radius: 10px;
    transition: 0.3s;
}

.sidebar-nav a:hover, .sidebar-nav li.active a {
    background-color: var(--primary);
    color: #FFF;
}

.sidebar-footer {
    margin-top: auto;
}

.logout-btn {
    text-decoration: none;
    color: #E53935;
    font-weight: 600;
    font-size: 14px;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 30px 40px;
    overflow-y: auto;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: #FFF;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.metric-card h3 {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.metric-card .value {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 5px;
}

.metric-card .trend {
    font-size: 12px;
    color: var(--text-muted);
}

.metric-card .trend.positive {
    color: #05CD99;
}

/* Charts Section */
.charts-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.charts-row {
    display: flex;
    gap: 20px;
}

.chart-container {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.chart-container h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.chart-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.large-chart {
    width: 100%;
    height: 400px;
}

.half-chart {
    flex: 1;
    height: 350px;
}

/* APK Form Styles */
.apk-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input, .form-group textarea {
    padding: 10px 15px;
    border: 1px solid #E0E5F2;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary);
}

.form-options {
    margin: 10px 0;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    font-weight: 600;
    color: #E53935;
}

.publish-btn {
    background-color: var(--primary);
    color: #FFF;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.publish-btn:hover {
    background-color: #310D5D;
}

/* Version Timeline */
.version-timeline {
    list-style: none;
    margin-top: 20px;
    position: relative;
}

.version-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #E0E5F2;
}

.version-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    position: relative;
}

.v-badge {
    width: 42px;
    height: 42px;
    background-color: #E0E5F2;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    z-index: 1;
}

.v-badge.active {
    background-color: var(--secondary);
    color: #FFF;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.3);
}

.v-details {
    flex: 1;
    background-color: #FAFCFE;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #E0E5F2;
}

.v-details strong {
    display: block;
    color: var(--text-main);
    margin-bottom: 5px;
}

.v-details p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.v-date {
    font-size: 11px;
    color: #A3AED0;
    font-weight: 600;
}

/* User Management Table */
.user-manager-section {
    background-color: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}

.badge {
    background-color: rgba(255, 107, 0, 0.1);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.table-responsive {
    overflow-x: auto;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.user-table th, .user-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #E0E5F2;
}

.user-table th {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.u-avatar {
    width: 35px;
    height: 35px;
    background-color: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
}

.user-info strong {
    display: block;
    color: var(--text-main);
    font-size: 14px;
}

.user-info small {
    color: var(--text-muted);
    font-size: 12px;
}

.user-table td {
    font-size: 14px;
    color: var(--text-main);
}

.status-badge {
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.active {
    background-color: rgba(5, 205, 153, 0.1);
    color: #05CD99;
}

.action-cell {
    display: flex;
    gap: 10px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    transition: 0.3s;
    background-color: #F4F7FE;
    color: var(--text-main);
}

.action-btn:hover {
    background-color: var(--primary);
    color: white;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(11, 20, 55, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

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

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 20px;
    color: var(--text-main);
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body p {
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 15px;
}

.password-box {
    display: flex;
    margin-bottom: 15px;
}

.password-box input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #E0E5F2;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    outline: none;
    background-color: #FAFCFE;
}

.password-box .copy-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0 15px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 18px;
    transition: 0.3s;
}

.password-box .copy-btn:hover {
    background-color: #310D5D;
}

.small-text {
    font-size: 12px !important;
    color: var(--text-muted) !important;
    text-align: center;
}

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

.btn-outline {
    background: none;
    border: 1px solid #E0E5F2;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-main);
}

.btn-primary {
    background-color: var(--primary);
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: white;
    display: flex;
    align-items: center;
}

/* Tab Panes */
.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

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

.sidebar-nav li {
    margin-bottom: 15px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .charts-row {
        flex-direction: column;
    }
}

/* Toggle Switch UI */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.toggle-switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

.toggle-switch input:checked + .slider {
    background-color: var(--primary);
}

.toggle-switch input:checked + .slider:before {
    transform: translateX(20px);
}

.toggle-switch .slider.round {
    border-radius: 34px;
}

.toggle-switch .slider.round:before {
    border-radius: 50%;
}
