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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f5f7;
    color: #1f2937;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(135deg, #111827 0%, #263445 55%, #374151 100%);
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 14px;
    padding: 42px;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.25);
}

.login-brand {
    text-align: center;
    margin-bottom: 34px;
}

.brand-mark {
    width: 92px;
    height: 64px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111827;
    color: white;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: 2px;
    border-radius: 8px;
}

.login-brand h1 {
    font-size: 25px;
    margin-bottom: 7px;
}

.login-brand p {
    color: #6b7280;
    font-size: 15px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 15px;
    outline: none;
}

.form-group input:focus {
    border-color: #374151;
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.12);
}

.btn-primary {
    width: 100%;
    border: 0;
    border-radius: 7px;
    padding: 14px;
    background: #111827;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary:hover {
    background: #263445;
}

.alert {
    padding: 12px 14px;
    margin-bottom: 20px;
    border-radius: 7px;
    font-size: 14px;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.login-footer p {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
}

.login-footer span {
    font-size: 11px;
    color: #9ca3af;
}

@media (max-width: 520px) {
    .login-card {
        padding: 30px 22px;
    }

    .login-brand h1 {
        font-size: 22px;
    }
}

.login-logo {
    display: block;
    width: 210px;
    max-width: 85%;
    height: auto;
    margin: 0 auto 18px;
    object-fit: contain;
}

@media (max-width: 520px) {
    .login-logo {
        width: 180px;
    }
}

.app-page {
    min-height: 100vh;
    background: #f4f5f7;
}

.app-header {
    min-height: 82px;
    padding: 14px 32px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-brand img {
    width: 115px;
    height: 52px;
    object-fit: contain;
}

.header-brand h1 {
    font-size: 22px;
    margin-bottom: 3px;
}

.header-brand p {
    font-size: 13px;
    color: #6b7280;
}

.project-form {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto;
}

.form-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 20px;
}

.form-card h2 {
    font-size: 17px;
    margin-bottom: 22px;
    padding-bottom: 12px;
    border-bottom: 2px solid #c5a253;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.field {
    display: flex;
    flex-direction: column;
}

.field-wide {
    grid-column: span 2;
}

.field label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 7px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font: inherit;
    background: #fff;
}

.field textarea {
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: #b08b3e;
    box-shadow: 0 0 0 3px rgba(176, 139, 62, .12);
}

.financial-card {
    border-top: 3px solid #c5a253;
}

.money-input {
    display: flex;
    align-items: center;
}

.money-input span {
    padding: 11px 13px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-right: 0;
    border-radius: 6px 0 0 6px;
}

.money-input input {
    border-radius: 0 6px 6px 0;
}

.form-help {
    margin-top: 18px;
    color: #6b7280;
    font-size: 13px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin: 25px 0 40px;
}

.btn-save,
.btn-secondary,
.btn-cancel {
    text-decoration: none;
    border-radius: 6px;
    padding: 11px 20px;
    font-weight: 700;
    font-size: 14px;
}

.btn-save {
    border: 0;
    background: #111827;
    color: white;
    cursor: pointer;
}

.btn-save:hover {
    background: #c5a253;
    color: #111827;
}

.btn-secondary {
    background: #111827;
    color: white;
}

.btn-cancel {
    background: #e5e7eb;
    color: #374151;
}

.app-footer {
    padding: 25px;
    text-align: center;
    color: #9ca3af;
    font-size: 11px;
}

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

    .field-wide {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .app-header {
        padding: 12px 16px;
    }

    .header-brand img {
        width: 85px;
    }

    .header-brand h1 {
        font-size: 17px;
    }

    .header-brand p {
        display: none;
    }

    .project-form {
        width: calc(100% - 20px);
        margin-top: 12px;
    }

    .form-card {
        padding: 18px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-wide {
        grid-column: span 1;
    }

    .form-actions {
        position: sticky;
        bottom: 0;
        background: #f4f5f7;
        padding: 12px 0;
    }

    .btn-save {
        flex: 1;
    }
}
