:root {
    --bg-color: #f8fafc;
    --bg-lighter: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: rgba(0, 0, 0, 0.1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
}

/* PORTAL SPECIFIC STYLES */

.portal-header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.portal-main {
    padding-top: 120px;
    padding-bottom: 80px;
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

/* User Controls */
.user-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-email {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.btn-small {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
}

/* Login Box */
.login-box {
    max-width: 400px;
    margin: 0 auto;
    padding: 2.5rem;
    text-align: center;
}

.login-box h2 {
    margin-bottom: 0.5rem;
}

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

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--bg-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.2);
}

.error-msg {
    color: #ef4444;
    font-size: 0.9rem;
    margin-top: 1rem;
    background: rgba(239, 68, 68, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
}

.success-msg {
    color: #10b981;
    font-size: 0.9rem;
    margin-top: 1rem;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.5rem;
    border-radius: 4px;
}

/* Client Dashboard */
.client-header {
    margin-bottom: 2rem;
}

.client-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.client-header p {
    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-col h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.8rem;
}

/* Status List */
.status-list {
    list-style: none;
}

.status-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
}

.status-list li.completed {
    color: var(--text-main);
}

.status-list li.active {
    color: var(--primary);
    font-weight: 600;
}

.status-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid rgba(0, 0, 0, 0.15);
}

.status-list li.completed .status-icon {
    background: #10b981;
    border-color: #10b981;
}

.status-list li.active .status-icon {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Admin Dashboard */
.admin-header {
    margin-bottom: 2rem;
}

.inline-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.inline-form input {
    flex: 1;
    min-width: 200px;
    padding: 0.8rem;
    background: var(--bg-color);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: var(--text-main);
}

.projects-table-container {
    overflow-x: auto;
}

.projects-table {
    width: 100%;
    border-collapse: collapse;
}

.projects-table th,
.projects-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.projects-table th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.projects-table select {
    padding: 0.5rem;
    background: var(--bg-lighter);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-main);
    border-radius: 4px;
}

.tickets-list {
    list-style: none;
}

.ticket-item {
    padding: 1rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.ticket-type {
    color: var(--primary);
    font-weight: 600;
}

.ticket-date {
    color: var(--text-muted);
}

.ticket-desc {
    color: var(--text-main);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.8rem;
}

.ticket-status {
    display: inline-block;
    font-size: 0.8rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.1);
}

.status-todo { color: #f59e0b; background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); }
.status-doing { color: var(--primary); background: rgba(0, 210, 255, 0.1); border: 1px solid rgba(0, 210, 255, 0.3); }
.status-done { color: #10b981; background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); }

/* Kanban Styles */
.kanban-board {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-col {
    flex: 1;
    min-width: 300px;
    background: rgba(0, 0, 0, 0.02);
    border: 1px dashed rgba(0, 0, 0, 0.1);
}

.kanban-col h4 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-list {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-item {
    background: rgba(0, 0, 0, 0.05);
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.ticket-item:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.06);
}

.ticket-item.todo-item { border-top-color: #f59e0b; }
.ticket-item.doing-item { border-top-color: var(--primary); }
.ticket-item.done-item { border-top-color: #10b981; }

.kanban-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-kanban {
    flex: 1;
    padding: 0.3rem;
    font-size: 0.8rem;
    text-align: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    color: var(--text-muted);
    transition: all 0.2s;
}

.btn-kanban:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content {
    background: var(--bg-lighter);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-main);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 0.5rem;
    transition: color 0.2s;
}

.btn-close:hover {
    color: var(--text-main);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.comment-item {
    background: rgba(0, 0, 0, 0.02);
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--border-color);
}

.comment-item.author-admin {
    border-left-color: var(--primary);
    background: rgba(0, 210, 255, 0.03);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.comment-author {
    font-weight: 600;
    color: var(--text-main);
}

.comment-author.author-admin {
    color: var(--primary);
}

.comment-date {
    color: var(--text-muted);
}

.comment-text {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.4;
    white-space: pre-wrap;
}

.ticket-item {
    cursor: pointer;
}
