/* variables */
:root {
    --primary: #FF7B54;
    --secondary: #FFB26B;
    --accent: #FFD56F;
    --bg-gradient-start: #2A2D34;
    --bg-gradient-end: #1E2024;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #FFFFFF;
    --text-muted: #A0A5B1;
    --danger: #FF4A4A;
    --success: #38E54D;
}

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

body {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-attachment: fixed;
    overflow-x: hidden;
}

.login-body {
    background: radial-gradient(circle at 50% 50%, #3e305e, #1a1b26);
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.login-box {
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 0.8s ease-out;
}

.login-box h1 {
    font-size: 28px;
    margin-bottom: 10px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-box p {
    color: var(--text-muted);
    margin-bottom: 30px;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

input {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 123, 84, 0.2);
    background: rgba(0, 0, 0, 0.4);
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: #fff;
    box-shadow: 0 4px 15px rgba(255, 123, 84, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 123, 84, 0.6);
}

.btn-block {
    width: 100%;
}

.error-text {
    color: var(--danger);
    font-size: 14px;
    margin-bottom: 15px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Layout */
.dashboard-body {
    display: block;
    padding: 30px;
    /* max-width for web, centered */
    max-width: 1400px;
    margin: 0 auto;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 30px;
    border-radius: 20px;
    animation: fadeIn 0.5s ease-out;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 10px;
    transition: 0.3s;
}

.logout-btn:hover {
    background: var(--danger);
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 25px;
}

/* Cards */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.card-title {
    font-size: 20px;
    font-weight: 600;
}

.item-list {
    list-style: none;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 12px;
    transition: 0.3s ease;
    border-left: 4px solid var(--primary);
    animation: fadeIn 0.4s ease-out;
}

.item:hover {
    transform: translateX(5px);
    background: rgba(0, 0, 0, 0.3);
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.item-badge {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
}

.badge-pending { color: var(--accent); }
.badge-completed { color: var(--success); }

/* Chat specific */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 580px;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.chat-input-area input {
    flex-grow: 1;
}

.msg-bubble {
    max-width: 80%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    position: relative;
    animation: fadeIn 0.3s;
}

.msg-self {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-bottom-right-radius: 4px;
}

.msg-other {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border-bottom-left-radius: 4px;
}

.msg-announcement {
    align-self: center;
    background: rgba(255, 213, 111, 0.15);
    border: 1px solid rgba(255, 213, 111, 0.3);
    color: var(--accent);
    font-size: 13px;
    text-align: center;
    max-width: 90%;
    border-radius: 8px;
}

.msg-author {
    font-size: 11px;
    opacity: 0.7;
    margin-bottom: 4px;
    display: block;
}

.chat-img {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 8px;
}

@media (max-width: 992px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
    .dashboard-body {
        padding: 15px;
    }
}

/* Modal specific */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    animation: fadeIn 0.3s;
}

.custom-select {
    width: 100%;
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 16px;
    outline: none;
}
.custom-select option {
    background: var(--bg-gradient-end);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 8px;
}
.checkbox-group input {
    width: auto;
}
