:root {
    --primary: #58cc02;
    --primary-shadow: #58a700;
    --secondary: #1cb0f6;
    --secondary-shadow: #1899d6;
    --danger: #ff4b4b;
    --danger-shadow: #ea2b2b;
    --warning: #ffc800;
    --warning-shadow: #e5b400;
    --outline: #e5e5e5;
    --outline-shadow: #c4c4c4;
    --text-main: #4b4b4b;
    --text-light: #afafaf;
    --bg-color: #f7f7f7;
    --card-bg: #ffffff;
    --font-family: 'Nunito', sans-serif;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* OVERLAY & CARDS */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.card {
    background: var(--card-bg);
    border: 2px solid var(--outline);
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.login-card {
    max-width: 400px;
    text-align: center;
}

.login-card h1 {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--text-main);
}

.login-card p {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 1.1rem;
    font-weight: 600;
}

input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    border: 2px solid var(--outline);
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: var(--font-family);
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.2s ease;
    background: #fdfdfd;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus {
    outline: none;
    border-color: var(--secondary);
    background: #fff;
}

/* BUTTONS */
.btn {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    font-family: var(--font-family);
}

.btn:active:not(:disabled) {
    transform: translateY(4px);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 0 var(--primary-shadow);
}
.btn-primary:active:not(:disabled) {
    box-shadow: 0 0 0 var(--primary-shadow);
}

.btn-secondary {
    background-color: var(--secondary);
    color: #fff;
    box-shadow: 0 4px 0 var(--secondary-shadow);
}
.btn-secondary:active:not(:disabled) {
    box-shadow: 0 0 0 var(--secondary-shadow);
}

.btn-outline {
    background-color: #fff;
    color: var(--secondary);
    border: 2px solid var(--outline);
    box-shadow: 0 4px 0 var(--outline-shadow);
}
.btn-outline:active:not(:disabled) {
    box-shadow: 0 0 0 var(--outline-shadow);
}

.actions {
    display: flex;
    gap: 16px;
    margin-top: 16px;
}

/* DASHBOARD */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: #fff;
    border-bottom: 2px solid var(--outline);
}

.logo {
    color: var(--primary);
    font-weight: 800;
    font-size: 1.5rem;
    text-transform: lowercase;
}

.top-nav .btn {
    width: auto;
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 12px;
}

.content {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* FILE DROP AREA */
.file-drop-area {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    padding: 25px;
    border: 2px dashed var(--outline);
    border-radius: 16px;
    transition: 0.2s;
    background: rgba(28, 176, 246, 0.05);
    margin-bottom: 16px;
    cursor: pointer;
}
.file-drop-area:hover {
    border-color: var(--secondary);
    background: rgba(28, 176, 246, 0.1);
}
.fake-btn {
    background-color: var(--secondary);
    border: 2px solid var(--secondary);
    border-radius: 12px;
    padding: 8px 15px;
    margin-right: 15px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    color: white;
}
.file-msg {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
}
.file-input {
    position: absolute;
    left: 0; top: 0; height: 100%; width: 100%;
    cursor: pointer;
    opacity: 0;
}
.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.file-item {
    background: #f1f1f1;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
}

/* PROJECT CARDS */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 16px;
}

.proj-card {
    border: 2px solid var(--outline);
    border-radius: 16px;
    padding: 24px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.proj-title {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 8px;
    word-break: break-all;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.status-draft { background: #e5e5e5; color: #4b4b4b; }
.status-pending { background: #ffc800; color: #fff; }
.status-processing { background: #1cb0f6; color: #fff; }
.status-completed { background: #58cc02; color: #fff; }
.status-failed { background: #ff4b4b; color: #fff; }

.error-msg {
    color: var(--danger);
    margin-top: 12px;
    font-weight: 600;
}

/* TOAST NOTIFICATION (Duolingo Style) */
.toast-container {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: auto;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-container.hidden {
    bottom: -100px;
    opacity: 0;
}

.toast-message {
    background-color: var(--primary);
    color: #fff;
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 0 var(--primary-shadow);
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modal Title Input Override */
#modalProjTitle:focus {
    border-color: var(--secondary) !important;
    background: #fff !important;
    outline: none;
}

.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
    border: 2px solid var(--outline);
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 700;
    color: var(--text-main);
}
.attachment-actions {
    display: flex;
    gap: 8px;
}
.attachment-actions .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    width: auto;
}
