/* CCBready - Clean, Professional, Mobile-First */
:root {
    --primary: #1a5f2a;
    --primary-dark: #134620;
    --primary-light: #2d8a3f;
    --danger: #dc3545;
    --warning: #f59e0b;
    --success: #22c55e;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-500: #6c757d;
    --gray-700: #495057;
    --gray-900: #212529;
    --white: #ffffff;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
    min-height: 100vh;
}

/* Typography */
h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.page {
    display: none;
    padding: 1rem 0 5rem;
}

.page.active {
    display: block;
}

/* Header */
.header {
    background: var(--primary);
    color: var(--white);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.logo span {
    color: #90EE90;
}

.header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.user-name {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    padding: 0.5rem;
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.1);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1rem;
}

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

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.card-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: var(--gray-700);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 95, 42, 0.1);
}

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

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

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.auth-title {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

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

.badge-gray {
    background: var(--gray-200);
    color: var(--gray-700);
}

/* Project List */
.project-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.project-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.project-stats {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* Requirements Checklist */
.requirement-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.requirement-item:last-child {
    border-bottom: none;
}

.requirement-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    margin-top: 2px;
}

.requirement-check:hover {
    border-color: var(--primary);
    background: rgba(26, 95, 42, 0.05);
}

.requirement-check.checked {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}

.requirement-check.overdue {
    border-color: var(--danger);
    background: #fee2e2;
}

.requirement-content {
    flex: 1;
}

.requirement-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.requirement-desc {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.requirement-due {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.requirement-due.overdue {
    color: var(--danger);
    font-weight: 500;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    padding: 0.25rem;
    line-height: 1;
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* FAB */
.fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.fab:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* Toast */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--gray-900);
    color: var(--white);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
}

.toast.success {
    background: var(--success);
}

.toast.error {
    background: var(--danger);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }

/* Back Button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    cursor: pointer;
}

.back-btn:hover {
    color: var(--gray-700);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0 1rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.file-upload:hover {
    border-color: var(--primary);
}

.file-upload-input {
    display: none;
}

.file-list {
    margin-top: 1rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Notice Cards */
.notice-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.notice-item:last-child {
    background: #fff5f5;
    border-color: var(--danger);
}

.notice-info {
    flex: 1;
}

.notice-info strong {
    display: block;
    margin-bottom: 0.25rem;
}

.notice-info p {
    margin: 0;
    font-size: 0.875rem;
}

.notice-actions {
    display: flex;
    gap: 0.5rem;
}

.text-warning {
    color: var(--danger);
}

/* Billing Modal */
.billing-plans {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.billing-plan {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.billing-plan:hover {
    border-color: var(--primary);
}

.billing-plan.featured {
    border-color: var(--primary);
    background: rgba(26, 95, 42, 0.05);
}

.billing-plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.billing-plan-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.billing-plan-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.billing-plan-price span {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray-500);
}

.billing-plan-features {
    list-style: none;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.billing-plan-features li {
    padding: 0.25rem 0;
}

.billing-plan-features li::before {
    content: "✓ ";
    color: var(--success);
}

.billing-current {
    background: var(--gray-100);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}
