@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg-body: #06070a;
    --bg-sidebar: #0d0f17;
    --bg-card: #121421;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --text-main: #ffffff;
    --text-muted: #8e92a6;
    --border: rgba(255, 255, 255, 0.05);
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-body);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
}

.app-wrapper {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.app-sidebar {
    width: 280px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 24px;
}

.app-logo {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    color: var(--text-main);
}

.app-logo span {
    color: var(--accent);
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section-title {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    padding-left: 12px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    margin-bottom: 4px;
    transition: all 0.2s;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-main);
}

.nav-item.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* Main Content */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-topbar {
    height: 80px;
    border-bottom: 1px solid var(--border);
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.content-area {
    padding: 40px;
    overflow-y: auto;
    flex: 1;
}

/* Tasks Styles */
.tabs-minimal {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid var(--border);
    width: 100%;
}

.tab-link {
    padding: 15px 0;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    font-size: 1rem;
}

.tab-link.active {
    color: var(--text-main);
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

.add-task-inline {
    display: flex;
    gap: 15px;
    margin: 30px 0;
}

.add-task-inline input {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 20px;
    color: #fff;
    outline: none;
    font-size: 0.9rem;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}

.btn-plus {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0 30px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

/* List Items */
.task-table-header {
    background: #2c241a;
    display: grid;
    grid-template-columns: 120px 1fr 180px 200px 180px;
    padding: 15px 24px;
    border-radius: 12px 12px 0 0;
    margin-top: 30px;
    border: 1px solid rgba(243, 156, 18, 0.1);
}

.task-table-header div {
    color: #f39c12;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.task-row {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-top: none;
    padding: 24px;
    display: grid;
    grid-template-columns: 120px 1fr 180px 200px 180px;
    align-items: center;
    gap: 20px;
}

.task-row:last-child {
    border-radius: 0 0 16px 16px;
}

.t-time { color: var(--text-muted); font-size: 0.9rem; }
.t-desc { font-weight: 600; font-size: 1.1rem; }
.t-user a { color: #f39c12; font-weight: 700; text-decoration: none; }

.status-dropdown {
    background: #1c1e2d;
    color: #fff;
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: 8px;
    outline: none;
    width: 100%;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.status-select-custom.sel-new { border-color: var(--danger); color: var(--danger); background: rgba(239, 68, 68, 0.05); }
.status-select-custom.sel-in_progress { border-color: var(--warning); color: var(--warning); background: rgba(245, 158, 11, 0.05); }
.status-select-custom.sel-completed { border-color: var(--success); color: var(--success); background: rgba(16, 185, 129, 0.05); }

.badge-min {
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.status-new { color: var(--danger); background: rgba(239, 68, 68, 0.1); }
.status-work { color: var(--warning); background: rgba(245, 158, 11, 0.1); }
.status-done { color: var(--success); background: rgba(16, 185, 129, 0.1); }

.action-btn {
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
}

.btn-take { background: var(--accent); color: #fff; }
.btn-submit { background: var(--success); color: #fff; }

/* Profile Styles */
.profile-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
}

.profile-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    background: var(--accent);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
}

.profile-name { font-size: 1.8rem; font-weight: 800; margin-bottom: 5px; }
.profile-role { color: var(--text-muted); text-transform: uppercase; font-size: 0.8rem; letter-spacing: 2px; margin-bottom: 20px; }

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 25px;
}

.info-card-label { color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; margin-bottom: 10px; }
.info-card-value { font-size: 1.5rem; font-weight: 800; }

.history-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 24px; padding: 30px; }
.history-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.history-item { display: flex; justify-content: space-between; padding: 15px 0; border-bottom: 1px solid var(--border); }

/* Chat Styles */
.chat-container {
    width: 380px;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    height: 100vh;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
}

.chat-container.hidden { 
    width: 0; 
    border-left: none; 
}

.chat-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

.chat-header h3 {
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-header h3::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.02));
}

.chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.chat-msg {
    max-width: 85%;
    align-self: flex-start;
}

.chat-msg-user {
    font-weight: 700;
    color: var(--accent);
    font-size: 0.75rem;
    margin-bottom: 6px;
    display: block;
    text-decoration: none;
    transition: all 0.2s;
}

.chat-msg-user:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

.chat-msg-bubble {
    background: rgba(255, 255, 255, 0.04);
    padding: 12px 16px;
    border-radius: 4px 16px 16px 16px;
    border: 1px solid var(--border);
    position: relative;
}

.chat-msg-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e2e8f0;
    word-break: break-word;
}

.chat-input-area {
    padding: 24px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input-wrapper {
    flex: 1;
    position: relative;
}

.chat-input-wrapper input {
    width: 100%;
    background: #181a27;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    color: #fff;
    outline: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.chat-input-wrapper input:focus {
    border-color: var(--accent);
    background: #1c1e2d;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

.chat-toggle {
    position: absolute;
    left: -40px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 60px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border);
    border-right: none;
    border-radius: 12px 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s;
    z-index: 100;
}

.chat-toggle:hover {
    color: var(--accent);
    background: #121421;
}

.chat-container.hidden .chat-toggle {
    border-right: 1px solid var(--border);
    border-radius: 12px;
    left: -50px;
}

.btn-chat-send {
    background: var(--accent);
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-chat-send:hover {
    background: var(--accent-hover);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-chat-send svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

/* Auth Redesign */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--bg-body);
}

.auth-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 450px;
    padding: 50px;
    border-radius: 24px;
    border: 1px solid var(--border);
    text-align: center;
}

.auth-input {
    width: 100%;
    background: #0d0f17;
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 12px;
    color: #fff;
    margin-bottom: 16px;
    outline: none;
}

.btn-auth {
    width: 100%;
    background: var(--accent);
    color: #fff;
    padding: 16px;
    border-radius: 12px;
    border: none;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.btn-auth:hover {
    background: var(--accent-hover);
    transform: scale(1.02);
}

.drop-zone {
    border: 2px dashed rgba(99, 102, 241, 0.2);
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
}
