* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background-image:
        linear-gradient(rgba(26, 8, 16, 0.85), rgba(10, 3, 7, 0.9)),
        url('2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #1a0810;
    color: #f7dbe6;
    min-height: 100vh;
    -webkit-text-size-adjust: 100%;
}

.login-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.login-box {
    width: 100%;
    background: rgba(42, 12, 24, 0.55);
    border-radius: 18px;
    padding: 36px 32px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 79, 139, 0.25) inset;
    border: 1px solid rgba(255, 79, 139, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.login-box h1 {
    text-align: center;
    color: #ff4f8b;
    font-size: 24px;
    margin-bottom: 6px;
}

.login-box .subtitle {
    text-align: center;
    color: #e0a8be;
    font-size: 14px;
    margin-bottom: 24px;
}

.login-box .error {
    background: rgba(74, 16, 32, 0.65);
    color: #ff8ab0;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    text-align: center;
    border: 1px solid rgba(255, 79, 139, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.input-group label {
    font-size: 13px;
    color: #e0a8be;
    font-weight: 600;
}

.input-group input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 79, 139, 0.35);
    background: rgba(20, 5, 12, 0.55);
    color: #ffe8f0;
    font-size: 16px;
    outline: none;
    transition: .2s;
    width: 100%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.input-group input::placeholder { color: #a05a76; }

.input-group input:focus {
    border-color: #ff4f8b;
    background: rgba(42, 12, 24, 0.7);
    box-shadow: 0 0 0 3px rgba(255, 79, 139, .25);
}

.login-box button {
    width: 100%;
    margin-top: 6px;
    padding: 13px 14px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(90deg, #ff4f8b, #c41e5a);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: .2s;
    letter-spacing: .3px;
}

.login-box button:hover { filter: brightness(1.15); }

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: rgba(46, 12, 28, 0.55);
    color: #ffe8f0;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255, 79, 139, 0.35);
    box-shadow: 0 2px 14px rgba(0, 0, 0, .45);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar .brand {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: .5px;
    color: #ff4f8b;
    white-space: nowrap;
}

.navbar .links {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.navbar .links a {
    color: #e0a8be;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    transition: .2s;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.navbar .links a:hover {
    background: rgba(255, 79, 139, 0.2);
    color: #fff0f5;
}

.navbar .links a.active {
    background: #ff4f8b;
    color: #ffffff;
}

.navbar .user {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #e0a8be;
    flex-wrap: wrap;
}

.navbar .logout {
    color: #fff0f5;
    text-decoration: none;
    background: rgba(255, 79, 139, 0.25);
    padding: 6px 12px;
    border-radius: 6px;
    transition: .2s;
    white-space: nowrap;
}

.navbar .logout:hover { background: #ff4f8b; }

.container {
    max-width: 1350px;
    margin: 30px auto;
    padding: 0 20px;
}

h1 {
    color: #ff4f8b;
    margin-bottom: 6px;
    font-size: 26px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}

.subtitle {
    color: #e0a8be;
    margin-bottom: 22px;
    font-size: 14px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}

.filters {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters input,
.filters select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 79, 139, 0.35);
    background: rgba(42, 12, 24, 0.45);
    color: #f7dbe6;
    font-size: 14px;
    outline: none;
    transition: .2s;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.filters input { flex: 1; min-width: 180px; }
.filters input::placeholder { color: #a05a76; }

.filters input:focus,
.filters select:focus {
    border-color: #ff4f8b;
    box-shadow: 0 0 0 3px rgba(255, 79, 139, .25);
}

.filters button {
    padding: 10px 14px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #ff4f8b, #c41e5a);
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: .2s;
}

.filters button:hover { filter: brightness(1.15); }

.table-wrap {
    background: rgba(26, 8, 16, 0.45);
    border-radius: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow: 0 10px 34px rgba(0, 0, 0, .45);
    border: 1px solid rgba(255, 79, 139, 0.3);
    -webkit-overflow-scrolling: touch;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
    table-layout: auto;
    min-width: 600px;
}

thead {
    background: rgba(46, 12, 28, 0.75);
    position: sticky;
    top: 0;
    z-index: 2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

th {
    text-align: left;
    padding: 14px 18px;
    color: #ff4f8b;
    font-weight: 700;
    border-bottom: 2px solid #ff4f8b;
    white-space: nowrap;
    letter-spacing: .3px;
    font-size: 13px;
    text-transform: uppercase;
}

td {
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 79, 139, 0.12);
    color: #f7dbe6;
    vertical-align: top;
    line-height: 1.5;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    max-width: 380px;
}

tbody tr { transition: background .15s; }
tbody tr:nth-child(even) { background: rgba(20, 5, 12, 0.25); }
tbody tr:hover { background: rgba(255, 79, 139, 0.18); }
tbody tr:hover td { color: #ffffff; }

td:first-child,
th:first-child {
    white-space: nowrap;
    width: 1%;
    font-variant-numeric: tabular-nums;
    color: #ff8ab0;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
}

.empty {
    text-align: center;
    color: #a05a76;
    padding: 40px;
    font-style: italic;
}

.pagination {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.pagination a {
    display: inline-block;
    padding: 9px 14px;
    border-radius: 8px;
    background: rgba(42, 12, 24, 0.45);
    color: #c77a9a;
    text-decoration: none;
    border: 1px solid rgba(255, 79, 139, 0.3);
    transition: .18s;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.pagination a:hover {
    background: rgba(255, 79, 139, 0.25);
    color: #fff0f5;
}

.pagination a.active {
    background: linear-gradient(90deg, #ff4f8b, #c41e5a);
    color: #fff;
    border-color: transparent;
}

.console-panel {
    background: rgba(14, 4, 8, 0.75);
    border: 1px solid rgba(255, 79, 139, 0.35);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 10px 34px rgba(0, 0, 0, .55),
        0 0 0 1px rgba(255, 79, 139, 0.08) inset;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.console-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px 18px;
    background: linear-gradient(90deg, rgba(46, 12, 28, 0.95), rgba(26, 8, 16, 0.95));
    border-bottom: 1px solid rgba(255, 79, 139, 0.35);
    color: #e0a8be;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
}

.console-controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.console-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: #e0a8be;
    font-size: 13px;
    user-select: none;
}

.console-toggle input { accent-color: #ff4f8b; }

.console-controls button {
    padding: 7px 16px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #ff4f8b, #c41e5a);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
}

.console-controls button:hover { filter: brightness(1.15); }

.console-output {
    margin: 0;
    padding: 16px;
    background: rgba(5, 2, 4, 0.85);
    color: #ffffff;
    font-family: 'Etna', 'Etna Mono', 'Consolas', 'Courier New', monospace;
    font-weight: 700;
    font-size: 13px;
    line-height: 1.45;
    height: 560px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    letter-spacing: -0.3px;
    word-spacing: -0.5px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 79, 139, 0.5) transparent;
}

.console-output::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.console-output::-webkit-scrollbar-track {
    background: rgba(255, 79, 139, 0.05);
}

.console-output::-webkit-scrollbar-thumb {
    background: rgba(255, 79, 139, 0.35);
    border-radius: 6px;
}

.console-output::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 79, 139, 0.6);
}

.log-line {
    display: block;
    padding: 1px 0;
    font-family: inherit;
    font-weight: 700;
    letter-spacing: -0.3px;
    word-spacing: -0.5px;
}

.log-normal {
    color: #ffffff;
}

.log-debug {
    color: #ffd23f;
    background: rgba(255, 210, 63, 0.07);
    border-left: 3px solid #ffd23f;
    padding-left: 10px;
}

.log-error {
    color: #ff4f6e;
    background: rgba(255, 79, 110, 0.08);
    border-left: 3px solid #ff4f6e;
    padding-left: 10px;
}

.log-success {
    color: #4ade80;
    background: rgba(74, 222, 128, 0.07);
    border-left: 3px solid #4ade80;
    padding-left: 10px;
}

.log-warn {
    color: #ffb84f;
    background: rgba(255, 184, 79, 0.07);
    border-left: 3px solid #ffb84f;
    padding-left: 10px;
}

.log-info {
    color: #4fc3f7;
    border-left: 3px solid rgba(79, 195, 247, 0.4);
    padding-left: 10px;
}

.ftp-alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ftp-alert-ok {
    background: rgba(30, 100, 50, 0.55);
    color: #7affa0;
    border: 1px solid rgba(46, 106, 58, 0.7);
}

.ftp-alert-err {
    background: rgba(74, 16, 32, 0.65);
    color: #ff8ab0;
    border: 1px solid rgba(255, 79, 139, 0.5);
}

.ftp-toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.ftp-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    background: rgba(26, 8, 16, 0.55);
    border: 1px solid rgba(255, 79, 139, 0.3);
    border-radius: 12px;
    padding: 12px 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ftp-form input[type="file"],
.ftp-form input[type="text"] {
    padding: 9px 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 79, 139, 0.35);
    background: rgba(20, 5, 12, 0.55);
    color: #f7dbe6;
    font-size: 14px;
    outline: none;
    transition: .2s;
}

.ftp-form input[type="file"] { max-width: 260px; }
.ftp-form input[type="file"]::file-selector-button {
    background: linear-gradient(90deg, #ff4f8b, #c41e5a);
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-right: 10px;
}

.ftp-form input[type="text"]:focus {
    border-color: #ff4f8b;
    box-shadow: 0 0 0 3px rgba(255, 79, 139, .25);
}

.ftp-form button,
.ftp-btn {
    padding: 9px 16px;
    border-radius: 8px;
    border: none;
    background: linear-gradient(90deg, #ff4f8b, #c41e5a);
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: .2s;
    white-space: nowrap;
}

.ftp-form button:hover,
.ftp-btn:hover { filter: brightness(1.15); }

.ftp-btn-danger {
    background: linear-gradient(90deg, #e01040, #8c0a28);
}

.ftp-link {
    color: #ff8ab0;
    text-decoration: none;
    transition: .2s;
}
.ftp-link:hover {
    color: #fff0f5;
    text-decoration: underline;
}

.ftp-name {
    color: #f7dbe6;
    word-break: break-all;
}

.upload-progress {
    margin-bottom: 18px;
}

.upload-progress-bar {
    width: 100%;
    height: 22px;
    background: rgba(20, 5, 12, 0.7);
    border: 1px solid rgba(255, 79, 139, 0.4);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.upload-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff4f8b, #c41e5a);
    transition: width 0.2s ease;
    border-radius: 10px 0 0 10px;
}

.upload-progress-text {
    margin-top: 6px;
    color: #e0a8be;
    font-size: 13px;
    text-align: center;
    font-family: 'Consolas', monospace;
}

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }

    .navbar {
        padding: 12px 16px;
        gap: 8px;
    }

    .navbar .brand {
        font-size: 16px;
    }

    .navbar .links {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .navbar .links a {
        padding: 7px 10px;
        font-size: 13px;
    }

    .navbar .user {
        font-size: 12px;
        gap: 8px;
    }

    .navbar .user span {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .container {
        margin: 18px auto;
        padding: 0 12px;
    }

    h1 { font-size: 20px; }
    .subtitle { font-size: 13px; margin-bottom: 16px; }

    .filters {
        gap: 8px;
    }

    .filters input {
        flex: 1 1 100%;
    }

    .filters button {
        flex: 1 1 100%;
    }

    th { padding: 10px 12px; font-size: 12px; }
    td { padding: 10px 12px; font-size: 13px; }

    .pagination a {
        padding: 8px 11px;
        font-size: 13px;
        min-width: 36px;
    }

    .login-box {
        padding: 28px 22px;
        border-radius: 14px;
    }

    .login-box h1 { font-size: 20px; }

    .console-output {
        height: 380px;
        font-size: 12px;
    }

    .console-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .console-controls {
        width: 100%;
        justify-content: space-between;
    }

    .ftp-toolbar {
        flex-direction: column;
    }

    .ftp-form {
        width: 100%;
    }

    .ftp-form input[type="file"],
    .ftp-form input[type="text"] {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .ftp-form button {
        flex: 1 1 100%;
    }
}

@media (max-width: 480px) {
    .login-body { padding: 12px; }

    .login-box { padding: 24px 18px; }

    .navbar .user span {
        display: none;
    }

    .console-output {
        height: 320px;
    }
}