/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #0a0a0f;
    color: #e1e1ec;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 60% !important;  /* ← растягиваем на всю ширину */
    margin: 0 auto;
    padding: 0 20px;
}


/* ===== HEADER ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 30px;
}

.header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
}

.header h1 i {
    color: #5865F2;
    margin-right: 10px;
}

.user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.user span {
    color: #b0b0c4;
    font-size: 14px;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 6px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(88, 101, 242, 0.1);
    color: #5865F2;
    border-color: rgba(88, 101, 242, 0.2);
    width: 32px;
    height: 32px;
    font-size: 14px;
}
.btn-outline:hover {
    background: rgba(88, 101, 242, 0.18);
    border-color: rgba(88, 101, 242, 0.35);
}

.btn-primary {
    background: #5865F2;
    color: #fff;
    border: none;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary:hover {
    background: #4752c4;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(88, 101, 242, 0.3);
}

.btn-danger {
    background: #f04747;
    color: #fff;
    border: none;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-danger:hover {
    background: #d03a3a;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(240, 71, 71, 0.08);
    border: 1px solid rgba(240, 71, 71, 0.11);
    border-radius: 33%;
    color: #f04747;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}
.logout-btn:hover {
    background: rgba(240, 71, 71, 0.2);
    border-color: rgba(240, 71, 71, 0.3);
}

/* ===== STATUS MESSAGES ===== */
.status-message {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 14px;
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-message.success {
    display: block;
    border-color: rgba(67, 181, 129, 0.3);
    color: #43b581;
    background: rgba(67, 181, 129, 0.05);
}

.status-message.error {
    display: block;
    border-color: rgba(240, 71, 71, 0.3);
    color: #f04747;
    background: rgba(240, 71, 71, 0.05);
}

.status-message.info {
    display: block;
    border-color: rgba(88, 101, 242, 0.3);
    color: #5865F2;
    background: rgba(88, 101, 242, 0.05);
}

/* ===== COG LIST ===== */
.cog-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cog-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.cog-item:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
}

.cog-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
}

.cog-name {
    font-size: 15px;
    font-weight: 500;
    color: #e1e1ec;
    font-family: 'Courier New', monospace;
}

.cog-status {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 12px;
}

.cog-status.loaded {
    background: rgba(67, 181, 129, 0.15);
    color: #43b581;
}

.cog-status.pending {
    background: rgba(250, 166, 26, 0.15);
    color: #faa61a;
    border: 1px solid rgba(250, 166, 26, 0.15);
}

.cog-status.unloaded {
    background: rgba(160, 160, 170, 0.15);
    color: #8a8a9e;
}

.cog-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #2a2a3a;
    border-radius: 26px;
    transition: 0.3s ease;
}

.slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: #5a5a6e;
    border-radius: 50%;
    transition: 0.3s ease;
}

.switch input:checked + .slider {
    background: #43b581;
}

.switch input:checked + .slider::before {
    transform: translateX(22px);
    background: #ffffff;
}

.switch input:disabled + .slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.reload-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: #8a8a9e;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reload-btn:hover:not(:disabled) {
    background: rgba(250, 166, 26, 0.15);
    color: #faa61a;
}

.reload-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== PERMISSION ITEMS ===== */
.permission-items {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

.permission-items::-webkit-scrollbar {
    width: 4px;
}
.permission-items::-webkit-scrollbar-thumb {
    background: #2a2a3a;
    border-radius: 2px;
}

.permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.permission-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
}

.permission-name {
    font-size: 14px;
    color: #e1e1ec;
    display: flex;
    align-items: center;
    gap: 8px;
}

.permission-name i {
    color: #5865F2;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .user {
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 0 10px;
    }
    .cog-item {
        flex-wrap: wrap;
        gap: 12px;
    }
    .cog-info {
        width: 100%;
    }
    .cog-controls {
        width: 100%;
        justify-content: flex-end;
    }
    .header {
        text-align: center;
        align-items: center;
    }
    .user {
        justify-content: center;
    }
}