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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f9fafb;
    color: #111827;
    line-height: 1.5;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Login Page Styles */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f9fafb 0%, #e5e7eb 100%);
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
}

.login-logo {
    width: 64px;
    height: 64px;
    background-color: #2BDA8E;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.login-logo svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
    color: #111827;
}

.brand-title {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.brand-title-login {
    justify-content: center;
}

.brand-mark {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.7rem;
    background: linear-gradient(135deg, #2BDA8E 0%, #1fbf78 100%);
    color: white;
    box-shadow: 0 10px 18px rgba(43, 218, 142, 0.24);
    flex-shrink: 0;
}

.brand-mark-image {
    width: 2.4rem;
    height: 2.4rem;
    background: transparent;
    color: inherit;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
}

.brand-mark svg {
    width: 1rem;
    height: 1rem;
    stroke: currentColor;
}

.logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: transparent;
}

.login-subtitle {
    text-align: center;
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
    background: white;
}

.brand-title-login {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: #2BDA8E;
    box-shadow: 0 0 0 3px rgba(43, 218, 142, 0.1);
}

.error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-bottom: 1rem;
    color: #dc2626;
    font-size: 0.875rem;
}


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background-color: #2BDA8E;
    color: white;
    width: 100%;
    height: 44px;
}

.btn-primary:hover {
    background-color: #26c47f;
    box-shadow: 0 4px 6px -1px rgba(43, 218, 142, 0.3);
}

.btn-primary:active {
    transform: scale(0.98);
}

.demo-info {
    margin-top: 1.5rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.demo-info p:first-child {
    margin-bottom: 0.5rem;
}

.demo-info p:last-child {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Header Styles */
.header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 1rem;
    gap: 1rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.header-info h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.header-info p {
    font-size: 0.875rem;
    color: #6b7280;
}

.header-info {
    min-width: 0;
}

.header-info .brand-title {
    flex-wrap: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    flex-shrink: 0;
}

.header-user-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    min-width: 0;
}

.header-user-label {
    font-size: 0.72rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.header-user-name {
    font-size: 0.92rem;
    color: #111827;
    font-weight: 600;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-outline {
    background: white;
    border: 1px solid #d1d5db;
    color: #374151;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-outline:hover {
    background-color: #f9fafb;
}

.btn-icon-only {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 999px;
    justify-content: center;
}

.btn-icon-only svg {
    width: 17px;
    height: 17px;
}

.header-menu-toggle {
    display: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: white;
    color: #374151;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.header-menu-toggle:hover {
    background: #f9fafb;
}

.header-mobile-menu {
    display: none;
}

.header-mobile-menu.is-open {
    display: none;
}

.header-mobile-user {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

/* Dashboard Styles */
.main-content {
    padding: 2rem 1rem;
}

.filters-card {
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.filters-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.filters-row-two {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .filters-row {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .filters-row-two {
        grid-template-columns: 2fr 1fr;
    }
}

.search-wrapper {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: #9ca3af;
}

.search-input {
    padding-left: 2.5rem !important;
}

.select-wrapper {
    position: relative;
}

.form-select {
    width: 100%;
    padding: 0.625rem 2rem 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    appearance: none;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #2BDA8E;
    box-shadow: 0 0 0 3px rgba(43, 218, 142, 0.1);
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #6b7280;
    pointer-events: none;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.section-header-actions {
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header svg {
    width: 20px;
    height: 20px;
    stroke: #4b5563;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
}

.section-header .count {
    font-size: 0.875rem;
    color: #6b7280;
    margin-left: 0.5rem;
}

.projects-table-wrapper {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

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

.projects-table thead {
    background: #f9fafb;
}

.projects-table th,
.projects-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.projects-table th {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

.projects-table tbody tr:hover {
    background: #fcfcfd;
}

.projects-table tbody tr:last-child td {
    border-bottom: none;
}

.table-project-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.table-last-message {
    max-width: 460px;
    color: #374151;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.table-last-time {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: #9ca3af;
}

.btn-inline {
    width: auto;
    white-space: nowrap;
}

.btn-table-action {
    min-width: auto;
    width: auto;
    height: 34px;
    padding: 0.4rem 0.7rem;
    font-size: 0.78rem;
    border-radius: 999px;
    box-shadow: none;
}

.btn-table-action svg {
    width: 14px;
    height: 14px;
}

.btn-view-toggle {
    width: auto;
    height: 36px;
    padding: 0.45rem 0.9rem;
    font-size: 0.84rem;
    border-radius: 999px;
    margin-left: auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.project-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.25rem;
    transition: box-shadow 0.2s;
}

.project-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.project-info h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.project-info p {
    font-size: 0.875rem;
    color: #6b7280;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-active {
    background-color: #2BDA8E;
    color: white;
}

.badge-completed {
    background-color: #3b82f6;
    color: white;
}

.badge-pending {
    background-color: #f59e0b;
    color: white;
}

.project-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-time {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.project-time svg {
    width: 16px;
    height: 16px;
    stroke: #6b7280;
}

.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-sm svg {
    width: 16px;
    height: 16px;
}

.empty-state {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    stroke: #9ca3af;
    margin: 0 auto 1rem;
}

.empty-state h3 {
    font-size: 1.125rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: #6b7280;
}

/* Comments Page Styles */
.comments-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #f9fafb;
}

.comments-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.comments-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    max-width: 896px;
    margin: 0 auto;
}

.btn-back {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-back:hover {
    background-color: #f3f4f6;
}

.btn-back svg {
    width: 20px;
    height: 20px;
    stroke: #374151;
}

.comments-header-info {
    flex: 1;
    min-width: 0;
}

.comments-header-info h1 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.comments-header-info p {
    font-size: 0.875rem;
    color: #6b7280;
}

.comments-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1rem;
}

.comments-container {
    max-width: 896px;
    margin: 0 auto;
}

.comments-error-message {
    margin-bottom: 1rem;
}

.date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.date-label {
    background-color: #e5e7eb;
    color: #4b5563;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.comment-group {
    margin-bottom: 1.5rem;
}

.comment {
    display: flex;
    margin-bottom: 0.75rem;
}

.comment.comment-right {
    justify-content: flex-end;
}

.comment-bubble {
    max-width: 75%;
    padding: 0.625rem 1rem;
    border-radius: 16px;
    word-wrap: break-word;
}

.comment-left .comment-bubble {
    background-color: white;
    border: 1px solid #e5e7eb;
    color: #111827;
}

.comment-right .comment-bubble {
    background-color: #2BDA8E;
    color: white;
}

.comment-author {
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #4b5563;
}

.comment-message {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.comment-time {
    font-size: 0.75rem;
    opacity: 0.8;
}

.comment-right .comment-time {
    color: rgba(255, 255, 255, 0.9);
}

.comment-left .comment-time {
    color: #6b7280;
}

.comments-input-area {
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -1px 3px 0 rgba(0, 0, 0, 0.1);
}

.comments-input-container {
    max-width: 896px;
    margin: 0 auto;
    padding: 1rem;
}

.comment-form {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
}

.comment-input {
    flex: 1;
}

.comment-input-large {
    min-height: 92px;
    resize: vertical;
    padding: 0.9rem 1rem;
}

.btn-send {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
}

.btn-send-small {
    width: auto;
    height: 42px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.btn-send svg {
    width: 16px;
    height: 16px;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (min-width: 640px) {
    .comment-bubble {
        max-width: 60%;
    }
}

@media (max-width: 767px) {
    .projects-table-wrapper {
        overflow-x: auto;
    }

    .projects-table {
        min-width: 680px;
    }

    .comment-bubble {
        max-width: 100%;
    }

    .comment-form {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-send-small {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .header-content {
        height: auto;
        padding: 0.9rem 1rem;
        align-items: center;
        flex-wrap: nowrap;
    }

    .header-brand {
        flex: 1;
        min-width: 0;
    }

    .header-info h1 {
        font-size: 1.05rem;
    }

    .header-info p {
        font-size: 0.8rem;
    }

    .brand-title {
        gap: 0.55rem;
    }

    .brand-mark {
        width: 1.8rem;
        height: 1.8rem;
        border-radius: 0.6rem;
    }

    .brand-mark-image {
        width: 2.1rem;
        height: 2.1rem;
        border-radius: 0;
    }

    .header-user-summary,
    .header-actions .btn-icon-only {
        display: none;
    }

    .header-menu-toggle {
        display: inline-flex;
    }

    .section-header-actions {
        align-items: center;
    }

    .btn-view-toggle {
        margin-left: auto;
    }

    .header-mobile-menu {
        display: none;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0 1rem 0.9rem;
        border-top: 1px solid #e5e7eb;
        margin-top: 0.25rem;
    }

    .header-mobile-menu.is-open {
        display: flex;
    }
}

/* Icons */
.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}
