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

body {
    font-family: 'Poppins', sans-serif;
    background: #0f172a;
    color: #fff;
}

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

.sidebar {
    width: 260px;
    background: #111827;
    border-right: 1px solid #1f2937;
    padding: 30px 20px;
}

.logo {
    margin-bottom: 40px;
}

.logo h2 {
    color: #22c55e;
    font-size: 30px;
}

.logo span {
    color: #94a3b8;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.menu-btn {
    background: #1e293b;
    border: none;
    color: white;
    padding: 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: .3s;
    text-align: left;
    font-size: 15px;
}

.menu-btn:hover {
    background: #22c55e;
}

.menu-btn.active {
    background: #22c55e;
}

.content {
    flex: 1;
    padding: 35px;
}

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

header h1 {
    font-size: 30px;
}

header p {
    color: #94a3b8;
    margin-top: 8px;
}

#logout {
    background: #ef4444;
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: 10px;
    cursor: pointer;
}

.card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 25px;
}

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

.card-header h2 {
    font-size: 22px;
}

.card-header button {
    margin-left: 10px;
}

textarea {
    width: 100%;
    min-height: 220px;
    resize: vertical;
    border: none;
    outline: none;
    border-radius: 12px;
    padding: 18px;
    font-size: 15px;
    background: #1e293b;
    color: white;
}

textarea::placeholder {
    color: #64748b;
}

.small {
    margin-top: 12px;
    color: #94a3b8;
    font-size: 14px;
}

button {
    cursor: pointer;
    transition: .3s;
}

button:hover {
    transform: translateY(-2px);
}

#loadAccounts,
#loadMessages {
    background: #2563eb;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
}

#clearAccounts,
#clearMessages {
    background: #475569;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 10px;
}

.action-card {
    display: flex;
    gap: 20px;
}

.save {
    flex: 1;
    background: #16a34a;
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
}

.run {
    flex: 1;
    background: #f59e0b;
    color: white;
    border: none;
    padding: 18px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
}

.run:disabled {
    background: #374151;
    cursor: not-allowed;
}

#logs {
    background: #0f172a;
    border-radius: 12px;
    padding: 18px;
    min-height: 120px;
    color: #22c55e;
    font-family: monospace;
    overflow: auto;
}

@media(max-width: 900px) {
    .container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #1f2937;
    }
    .content {
        padding: 20px;
    }
    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .action-card {
        flex-direction: column;
    }
    textarea {
        min-height: 180px;
    }
}

/* ===== Auth Pages (Register / Login) ===== */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #0f172a;
    padding: 20px;
}

.auth-card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 18px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
}

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

.auth-card .logo h2 {
    color: #22c55e;
    font-size: 28px;
}

.auth-card .logo span {
    color: #94a3b8;
    font-size: 14px;
}

.auth-card h1 {
    font-size: 24px;
    margin-bottom: 8px;
    text-align: center;
}

.auth-card .subtitle {
    color: #94a3b8;
    text-align: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.auth-card label {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 5px;
}

.auth-card input {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 18px;
    border: 1px solid #1f2937;
    border-radius: 10px;
    background: #1e293b;
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.auth-card input:focus {
    border-color: #22c55e;
}

.auth-card input::placeholder {
    color: #64748b;
}

.auth-card .btn-primary {
    width: 100%;
    padding: 14px;
    background: #22c55e;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.auth-card .btn-primary:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

.auth-card .btn-primary:disabled {
    background: #374151;
    cursor: not-allowed;
    transform: none;
}

.auth-card .footer-text {
    text-align: center;
    margin-top: 20px;
    color: #94a3b8;
    font-size: 14px;
}

.auth-card .footer-text a {
    color: #22c55e;
    text-decoration: none;
    font-weight: 500;
}

.auth-card .footer-text a:hover {
    text-decoration: underline;
}

.auth-card .error-msg {
    background: #7f1d1d;
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 13px;
    display: none;
}

.auth-card .error-msg.show {
    display: block;
}

.auth-card .success-msg {
    background: #14532d;
    color: #86efac;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 13px;
    display: none;
}

.auth-card .success-msg.show {
    display: block;
}
