/* ============================================================
   PHP File Manager — Dark Theme Stylesheet
   ============================================================ */

/* ----- Reset & Base ----- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    background-color: #0a0a0f;
    color: #e4e4e7;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: #6c63ff;
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: #8b83ff;
}

img {
    max-width: 100%;
    height: auto;
}

/* ----- Keyframe Animations ----- */
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-18px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes progressPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .65; }
}

@keyframes barFill {
    from { width: 0; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* ----- Layout ----- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    padding: 30px 0;
    animation: fadeIn .35s ease;
}

/* ----- Header / Navbar ----- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #12121ae6;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #2a2a3e;
    padding: 0 20px;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.header-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #e4e4e7;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo span {
    color: #6c63ff;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}

.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    color: #a0a0b0;
    font-size: .9rem;
    transition: background .2s, color .2s;
}

.nav-links a:hover,
.nav-links a.active {
    background: #1a1a2e;
    color: #e4e4e7;
}

.nav-links a.active {
    color: #6c63ff;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #e4e4e7;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
}

/* ----- Cards & Panels ----- */
.card {
    background: #12121a;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
    transition: box-shadow .2s;
}

.card:hover {
    box-shadow: 0 6px 32px rgba(0, 0, 0, .35);
}

.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid #2a2a3e;
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.card-body {
    padding: 24px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: #12121a;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, .3);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #e4e4e7;
}

.stat-card .stat-label {
    font-size: .85rem;
    color: #6b6b80;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.stat-card .stat-icon {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

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

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: .9rem;
    color: #a0a0b0;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    color: #e4e4e7;
    font-size: .95rem;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    font-family: inherit;
}

.form-control::placeholder {
    color: #6b6b80;
}

.form-control:focus {
    border-color: #6c63ff;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, .18);
}

.form-control.is-invalid {
    border-color: #ff4757;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, .15);
}

.form-error {
    color: #ff4757;
    font-size: .82rem;
    margin-top: 4px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b6b80' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Inline form row */
.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 180px;
}

/* ----- Buttons ----- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s, transform .1s, box-shadow .2s;
    font-family: inherit;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:active {
    transform: scale(.97);
}

.btn-primary {
    background: #6c63ff;
    color: #fff;
}

.btn-primary:hover {
    background: #5a52e0;
    box-shadow: 0 4px 16px rgba(108, 99, 255, .3);
    color: #fff;
}

.btn-success {
    background: #00d4aa;
    color: #0a0a0f;
}

.btn-success:hover {
    background: #00b894;
    box-shadow: 0 4px 16px rgba(0, 212, 170, .25);
    color: #0a0a0f;
}

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

.btn-danger:hover {
    background: #e03e4d;
    box-shadow: 0 4px 16px rgba(255, 71, 87, .25);
    color: #fff;
}

.btn-warning {
    background: #ffa502;
    color: #0a0a0f;
}

.btn-warning:hover {
    background: #e89600;
    color: #0a0a0f;
}

.btn-secondary {
    background: #2a2a3e;
    color: #a0a0b0;
}

.btn-secondary:hover {
    background: #353550;
    color: #e4e4e7;
}

.btn-sm {
    padding: 6px 12px;
    font-size: .82rem;
    border-radius: 6px;
}

.btn-icon {
    padding: 8px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 8px;
}

.btn-icon.btn-sm {
    padding: 5px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 6px;
}

.btn-group {
    display: inline-flex;
    gap: 4px;
}

.btn-group .btn {
    border-radius: 6px;
}

.btn:disabled,
.btn.disabled {
    opacity: .5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ----- Tables ----- */
.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #2a2a3e;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}

.table th {
    background: #12121a;
    color: #a0a0b0;
    font-weight: 600;
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #2a2a3e;
    white-space: nowrap;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid #1e1e30;
    vertical-align: middle;
}

.table tbody tr {
    transition: background .15s;
}

.table tbody tr:hover {
    background: #1a1a2e;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* ----- Upload Zone ----- */
.upload-zone {
    border: 2px dashed #2a2a3e;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color .25s, background .25s;
    background: #0e0e16;
    position: relative;
}

.upload-zone:hover {
    border-color: #6c63ff;
    background: rgba(108, 99, 255, .04);
}

.upload-zone.dragover {
    border-color: #6c63ff;
    background: rgba(108, 99, 255, .08);
    box-shadow: 0 0 0 4px rgba(108, 99, 255, .12);
}

.upload-zone.uploading {
    pointer-events: none;
    opacity: .7;
}

.upload-zone .upload-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    color: #6b6b80;
}

.upload-zone .upload-text {
    color: #a0a0b0;
    font-size: .95rem;
}

.upload-zone .upload-text strong {
    color: #6c63ff;
}

.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-progress {
    margin-top: 18px;
    background: #1a1a2e;
    border-radius: 8px;
    height: 28px;
    overflow: hidden;
    position: relative;
    display: none;
}

.upload-progress.active {
    display: block;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #6c63ff, #8b83ff);
    border-radius: 8px;
    width: 0;
    transition: width .3s ease;
    animation: progressPulse 1.5s infinite;
}

.upload-progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .82rem;
    font-weight: 600;
    color: #e4e4e7;
    text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

/* ----- File List ----- */
.file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #1a1a2e;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.file-name {
    font-weight: 500;
    color: #e4e4e7;
    word-break: break-all;
}

.file-name a {
    color: #e4e4e7;
}

.file-name a:hover {
    color: #6c63ff;
}

.file-size {
    color: #6b6b80;
    font-size: .85rem;
    white-space: nowrap;
}

.file-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.download-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #00d4aa;
    font-size: .85rem;
    transition: color .2s;
}

.download-link:hover {
    color: #00ffcc;
}

.copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid #2a2a3e;
    border-radius: 6px;
    background: transparent;
    color: #a0a0b0;
    cursor: pointer;
    font-size: .82rem;
    transition: all .2s;
    position: relative;
    font-family: inherit;
}

.copy-btn:hover {
    border-color: #6c63ff;
    color: #6c63ff;
    background: rgba(108, 99, 255, .06);
}

.copy-btn.copied {
    border-color: #00d4aa;
    color: #00d4aa;
}

/* ----- Alerts ----- */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: .9rem;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown .35s ease;
    position: relative;
    border: 1px solid transparent;
}

.alert-dismiss {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.1rem;
    opacity: .6;
    transition: opacity .2s;
    padding: 0 4px;
    font-family: inherit;
}

.alert-dismiss:hover {
    opacity: 1;
}

.alert-success {
    background: rgba(0, 212, 170, .1);
    border-color: rgba(0, 212, 170, .25);
    color: #00d4aa;
}

.alert-error {
    background: rgba(255, 71, 87, .1);
    border-color: rgba(255, 71, 87, .25);
    color: #ff4757;
}

.alert-warning {
    background: rgba(255, 165, 2, .1);
    border-color: rgba(255, 165, 2, .25);
    color: #ffa502;
}

.alert-info {
    background: rgba(108, 99, 255, .1);
    border-color: rgba(108, 99, 255, .25);
    color: #8b83ff;
}

.alert.fade-out {
    animation: slideUp .35s ease forwards;
}

/* ----- Toast Notifications ----- */
.toast-container {
    position: fixed;
    top: 76px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 360px;
}

.toast {
    padding: 12px 18px;
    border-radius: 8px;
    font-size: .88rem;
    color: #e4e4e7;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .4);
    animation: slideDown .3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.toast.toast-success {
    background: #122a22;
    border-color: rgba(0, 212, 170, .3);
}

.toast.toast-error {
    background: #2a1218;
    border-color: rgba(255, 71, 87, .3);
}

.toast.toast-warning {
    background: #2a2012;
    border-color: rgba(255, 165, 2, .3);
}

.toast.toast-info {
    background: #16162a;
    border-color: rgba(108, 99, 255, .3);
}

.toast.fade-out {
    animation: slideUp .3s ease forwards;
}

/* ----- Auth Pages ----- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #0a0a0f;
}

.auth-card {
    background: #12121a;
    border: 1px solid #2a2a3e;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .4);
    animation: fadeIn .4s ease;
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
}

.auth-logo h1 span {
    color: #6c63ff;
}

.auth-logo p {
    color: #6b6b80;
    font-size: .9rem;
    margin-top: 6px;
}

.auth-card .form-group:last-of-type {
    margin-bottom: 24px;
}

.auth-card .btn {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: .88rem;
    color: #6b6b80;
}

.auth-footer a {
    color: #6c63ff;
    font-weight: 500;
}

/* ----- Modals ----- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn .2s ease;
}

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

.modal {
    background: #12121a;
    border: 1px solid #2a2a3e;
    border-radius: 14px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
    animation: fadeIn .25s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #2a2a3e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.05rem;
}

.modal-close {
    background: none;
    border: none;
    color: #6b6b80;
    cursor: pointer;
    font-size: 1.3rem;
    transition: color .2s;
    padding: 0 4px;
    font-family: inherit;
}

.modal-close:hover {
    color: #e4e4e7;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #2a2a3e;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* ----- FTP Browser ----- */
.ftp-browser {
    background: #12121a;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    overflow: hidden;
}

.ftp-path {
    padding: 12px 18px;
    background: #0e0e16;
    border-bottom: 1px solid #2a2a3e;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: .88rem;
    color: #a0a0b0;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    white-space: nowrap;
}

.ftp-path a {
    color: #6c63ff;
}

.ftp-path a:hover {
    text-decoration: underline;
}

.ftp-path .separator {
    color: #6b6b80;
}

.ftp-file-list {
    list-style: none;
}

.ftp-file-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid #1e1e30;
    transition: background .15s;
}

.ftp-file-list li:hover {
    background: #1a1a2e;
}

.ftp-file-list li:last-child {
    border-bottom: none;
}

.connection-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    font-weight: 500;
}

.connection-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.connection-status.online::before {
    background: #00d4aa;
    box-shadow: 0 0 8px rgba(0, 212, 170, .5);
}

.connection-status.offline::before {
    background: #ff4757;
    box-shadow: 0 0 8px rgba(255, 71, 87, .5);
}

.connection-card {
    background: #12121a;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    padding: 20px;
    transition: transform .2s, box-shadow .2s;
}

.connection-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 28px rgba(0, 0, 0, .3);
}

/* ----- Badges ----- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.badge-admin {
    background: rgba(108, 99, 255, .15);
    color: #8b83ff;
}

.badge-user {
    background: rgba(0, 212, 170, .15);
    color: #00d4aa;
}

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

.badge-warning {
    background: rgba(255, 165, 2, .15);
    color: #ffa502;
}

/* ----- Spinner ----- */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #2a2a3e;
    border-top-color: #6c63ff;
    border-radius: 50%;
    animation: spin .6s linear infinite;
    display: inline-block;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

/* ----- Storage Bar ----- */
.storage-bar {
    background: #1a1a2e;
    border-radius: 8px;
    height: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.storage-bar-fill {
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, #6c63ff, #00d4aa);
    transition: width .8s ease;
    animation: barFill .8s ease;
}

.storage-bar-fill.warning {
    background: linear-gradient(90deg, #ffa502, #ff4757);
}

.storage-info {
    display: flex;
    justify-content: space-between;
    font-size: .82rem;
    color: #6b6b80;
    margin-top: 6px;
}

/* ----- Empty State ----- */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: #6b6b80;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: .5;
}

.empty-state h3 {
    font-size: 1.15rem;
    color: #a0a0b0;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: .9rem;
}

/* ----- Search Bar ----- */
.search-bar {
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    background: #1a1a2e;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    color: #e4e4e7;
    font-size: .9rem;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
}

.search-bar input::placeholder {
    color: #6b6b80;
}

.search-bar input:focus {
    border-color: #6c63ff;
    box-shadow: 0 0 0 3px rgba(108, 99, 255, .18);
}

.search-bar .search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b6b80;
    font-size: .95rem;
    pointer-events: none;
}

/* ----- Custom Checkbox ----- */
.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: .9rem;
    color: #a0a0b0;
    user-select: none;
}

.checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #2a2a3e;
    border-radius: 4px;
    background: #1a1a2e;
    cursor: pointer;
    transition: all .15s;
    position: relative;
    flex-shrink: 0;
}

.checkbox input[type="checkbox"]:checked {
    background: #6c63ff;
    border-color: #6c63ff;
}

.checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
}

.checkbox input[type="checkbox"]:focus {
    box-shadow: 0 0 0 3px rgba(108, 99, 255, .18);
}

/* ----- Tooltip ----- */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) scale(.9);
    background: #1a1a2e;
    color: #e4e4e7;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: .78rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    border: 1px solid #2a2a3e;
    z-index: 50;
}

.tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* ----- Install Page ----- */
.install-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #0a0a0f;
}

.install-card {
    background: #12121a;
    border: 1px solid #2a2a3e;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 560px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, .4);
    animation: fadeIn .4s ease;
}

.install-step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.install-step .step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #6c63ff;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}

.install-step .step-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e4e4e7;
}

.install-step .step-desc {
    font-size: .85rem;
    color: #6b6b80;
}

.requirements-list {
    list-style: none;
    margin-bottom: 24px;
}

.requirements-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #1e1e30;
    font-size: .92rem;
}

.requirements-list li:last-child {
    border-bottom: none;
}

.requirement-pass {
    color: #00d4aa;
}

.requirement-pass::before {
    content: '✓';
    font-weight: 700;
    font-size: 1rem;
}

.requirement-fail {
    color: #ff4757;
}

.requirement-fail::before {
    content: '✗';
    font-weight: 700;
    font-size: 1rem;
}

/* ----- Utilities ----- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

.text-muted   { color: #6b6b80; }
.text-primary { color: #6c63ff; }
.text-success { color: #00d4aa; }
.text-danger  { color: #ff4757; }
.text-warning { color: #ffa502; }

.fw-bold   { font-weight: 700; }
.fw-medium { font-weight: 500; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.mr-1 { margin-right: 8px; }
.mr-2 { margin-right: 16px; }

.ml-1 { margin-left: 8px; }
.ml-auto { margin-left: auto; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

.d-flex       { display: flex; }
.d-inline-flex{ display: inline-flex; }
.d-none       { display: none; }
.d-block      { display: block; }
.flex-wrap    { flex-wrap: wrap; }
.flex-column  { flex-direction: column; }
.align-center { align-items: center; }
.align-start  { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

.w-100 { width: 100%; }

.rounded { border-radius: 8px; }

.overflow-hidden { overflow: hidden; }

.cursor-pointer { cursor: pointer; }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ----- Scrollbar (Webkit) ----- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0f;
}

::-webkit-scrollbar-thumb {
    background: #2a2a3e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a55;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .header .container {
        flex-wrap: wrap;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
        border-top: 1px solid #2a2a3e;
    }

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

    .nav-links a {
        width: 100%;
        padding: 12px 14px;
    }

    .header .container {
        height: auto;
        min-height: 60px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .card-body {
        padding: 16px;
    }

    .card-header {
        padding: 14px 16px;
        flex-wrap: wrap;
    }

    .table-responsive {
        margin: 0 -16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .form-row {
        flex-direction: column;
    }

    .form-row .form-group {
        min-width: 100%;
    }

    .upload-zone {
        padding: 32px 16px;
    }

    .auth-card {
        padding: 28px 22px;
    }

    .install-card {
        padding: 28px 22px;
    }

    .modal {
        width: 95%;
    }

    .toast-container {
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .btn-group {
        flex-wrap: wrap;
    }

    .file-actions {
        flex-wrap: wrap;
    }

    .d-flex.justify-between {
        flex-wrap: wrap;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card .stat-value {
        font-size: 1.4rem;
    }
}

/* ----- Print ----- */
@media print {
    .header, .upload-zone, .btn, .file-actions, .toast-container, .modal-overlay {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .table th {
        background: #eee;
        color: #000;
    }

    .table td {
        border-color: #ccc;
    }
}

/* ============================================================
   Page Component Aliases & Layout Enhancements
   ============================================================ */

/* Navbar */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: #12121a;
    border-bottom: 1px solid #2a2a3e;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}
.navbar-logo {
    font-size: 1.5rem;
}
.navbar-title {
    color: #e4e4e7;
}
.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar-menu .nav-link {
    padding: 8px 16px;
    border-radius: 6px;
    color: #a0a0b0;
    font-weight: 500;
    font-size: 0.92rem;
    transition: all 0.2s;
}
.navbar-menu .nav-link:hover {
    color: #fff;
    background: #1a1a2e;
}
.navbar-menu .nav-link.active {
    color: #fff;
    background: #6c63ff;
}
.navbar-menu .nav-link-danger:hover {
    color: #ff4757;
    background: rgba(255, 71, 87, 0.12);
}
.navbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #6c63ff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}
.user-name {
    color: #e4e4e7;
    font-size: 0.92rem;
    font-weight: 500;
}
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: #e4e4e7;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 24px 0;
}
.stats-bar .stat-card {
    background: #12121a;
    border: 1px solid #2a2a3e;
    border-radius: 12px;
    padding: 22px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}
.stats-bar .stat-card:hover {
    transform: translateY(-2px);
    border-color: #6c63ff;
}
.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #6c63ff;
    margin-bottom: 4px;
}
.stat-label {
    color: #a0a0b0;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Upload Section */
.upload-section {
    margin: 24px 0;
}
.upload-zone {
    border: 2px dashed #2a2a3e;
    border-radius: 12px;
    background: #12121a;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}
.upload-zone:hover, .upload-zone.drag-over {
    border-color: #6c63ff;
    background: #161626;
}
.upload-icon {
    font-size: 2.5rem;
    color: #6c63ff;
    margin-bottom: 12px;
}
.upload-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e4e4e7;
    margin-bottom: 4px;
}
.upload-subtext {
    color: #6b6b80;
    font-size: 0.88rem;
    margin-bottom: 18px;
}
.upload-btn {
    display: inline-block;
    cursor: pointer;
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    gap: 16px;
    flex-wrap: wrap;
}
.search-box {
    position: relative;
    max-width: 350px;
    width: 100%;
}
.search-input {
    width: 100%;
    padding: 10px 16px;
    border-radius: 8px;
    background: #12121a;
    border: 1px solid #2a2a3e;
    color: #e4e4e7;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}
.search-input:focus {
    border-color: #6c63ff;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #12121a;
    border-radius: 10px;
    overflow: hidden;
}
.data-table th {
    background: #1a1a2e;
    padding: 14px 16px;
    text-align: left;
    font-size: 0.85rem;
    color: #a0a0b0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2a2a3e;
}
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #1a1a2e;
    font-size: 0.92rem;
    vertical-align: middle;
}
.data-table tr:hover {
    background: #161628;
}
.data-table .col-checkbox {
    width: 40px;
    text-align: center;
}
.data-table .col-actions {
    text-align: right;
    white-space: nowrap;
}
.file-name-text {
    font-weight: 500;
    margin-left: 8px;
}
.file-icon {
    font-size: 1.2rem;
}

/* Buttons */
.btn-outline {
    background: transparent;
    border: 1px solid #2a2a3e;
    color: #e4e4e7;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-outline:hover {
    border-color: #6c63ff;
    color: #fff;
    background: rgba(108, 99, 255, 0.1);
}
.btn-danger-outline {
    background: transparent;
    border: 1px solid rgba(255, 71, 87, 0.4);
    color: #ff4757;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s;
}
.btn-danger-outline:hover {
    background: #ff4757;
    color: #fff;
}
.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

/* Badges */
.badge-type {
    background: #1a1a2e;
    color: #a0a0b0;
    border: 1px solid #2a2a3e;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}
.badge-admin {
    background: rgba(108, 99, 255, 0.2);
    color: #8b83ff;
    border: 1px solid #6c63ff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}
.badge-user {
    background: rgba(0, 212, 170, 0.15);
    color: #00d4aa;
    border: 1px solid #00d4aa;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Forms */
.form-input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    background: #0a0a0f;
    border: 1px solid #2a2a3e;
    color: #e4e4e7;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s;
}
.form-input:focus {
    border-color: #6c63ff;
}
.form-row-half {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}

/* FTP Layout */
.ftp-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 24px;
    margin-top: 24px;
}
.ftp-path-bar {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #1a1a2e;
    border-radius: 8px;
    margin-bottom: 16px;
    font-family: monospace;
    font-size: 0.95rem;
}
.ftp-path-label {
    color: #6b6b80;
    margin-right: 8px;
}
.ftp-path-current {
    color: #00d4aa;
    font-weight: 600;
}
.ftp-dir-link {
    background: none;
    border: none;
    color: #6c63ff;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.ftp-dir-link:hover {
    color: #8b83ff;
    text-decoration: underline;
}
.ftp-file-name {
    color: #e4e4e7;
}
.connection-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.connection-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #2a2a3e;
    border-radius: 8px;
    background: #0a0a0f;
    transition: border-color 0.2s;
}
.connection-item:hover, .connection-item.connection-active {
    border-color: #6c63ff;
}
.connection-name {
    font-weight: 600;
    color: #fff;
    margin-bottom: 2px;
}
.connection-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: #a0a0b0;
}
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}
.status-connected {
    background: #00d4aa;
    box-shadow: 0 0 8px rgba(0, 212, 170, 0.6);
}
.status-disconnected {
    background: #6b6b80;
}

/* Empty State */
.empty-state {
    padding: 40px 20px;
    text-align: center;
}
.empty-icon {
    font-size: 3rem;
    color: #6b6b80;
    margin-bottom: 12px;
}

/* Page Header */
.page-header {
    margin: 24px 0 16px 0;
}
.page-header h1 {
    font-size: 1.8rem;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #12121a;
        padding: 16px;
        border-bottom: 1px solid #2a2a3e;
    }
    .navbar-menu.open {
        display: flex;
    }
    .navbar-toggle {
        display: block;
    }
    .ftp-layout {
        grid-template-columns: 1fr;
    }
    .form-row-half {
        grid-template-columns: 1fr;
    }
}

