:root {
    /* Pastel Nature Palette */
    --primary-green: #7ebc8a;
    --primary-green-dark: #5fa069;
    --sky-blue: #7ec8e3;
    --sky-blue-dark: #5aa8cc;
    --cream: #fdf6e3;
    --cream-dark: #f5e6c8;
    --sand: #f0e4d4;
    --sage: #a8c9a0;
    --mint: #c5e8d5;
    --lavender: #c9b8e0;
    --peach: #f5d5c8;
    --coral: #e8b4a8;
    
    --text-dark: #3d4654;
    --text-light: #6b7c8c;
    --text-muted: #9aa5b5;
    
    --bg-cream: #faf8f5;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

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

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

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-green), var(--sky-blue));
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
}

.nav-brand a {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
}

.user-name {
    color: white;
    font-weight: 500;
}

/* Main container */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Flash messages */
.flash-messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.alert-success {
    background: var(--mint);
    color: #2d5a3d;
    border-left: 4px solid var(--primary-green);
}

.alert-error {
    background: var(--coral);
    color: #5a3028;
    border-left: 4px solid #d4887c;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

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

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

.btn-secondary {
    background: var(--sky-blue);
    color: white;
}

.btn-secondary:hover {
    background: var(--sky-blue-dark);
}

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

.btn-danger:hover {
    background: #d4887c;
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--sand);
    color: var(--text-dark);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--sand);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* Authentication pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
}

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

.auth-card h1 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-green-dark);
}

.auth-card .btn {
    width: 100%;
    margin-top: 1rem;
}

.auth-link {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-light);
}

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

/* Dashboard / Boards page */
.boards-page {
    padding: 1rem 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    color: var(--text-dark);
}

.boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.board-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.board-link {
    display: block;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
}

.board-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-green-dark);
}

.board-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.board-card small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.board-meta {
    padding: 0.75rem 1.5rem;
    background: var(--cream);
    display: flex;
    justify-content: flex-end;
}

.visibility-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.visibility-badge.public {
    background: var(--sky-blue);
    color: white;
}

.visibility-badge.private {
    background: var(--sand);
    color: var(--text-dark);
}

.public-boards-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 2px solid var(--sand);
}

.public-boards-section h2 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

/* Board view page */
.board-page {
    padding: 1rem 0;
}

.board-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

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

.back-link {
    color: var(--text-light);
    font-size: 1.25rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--primary-green);
}

.board-title-section h1 {
    color: var(--text-dark);
}

.board-actions {
    display: flex;
    gap: 0.75rem;
}

.board-description {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.lists-container {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    padding-bottom: 1rem;
    min-height: 400px;
}

.list-wrapper {
    min-width: 280px;
    max-width: 280px;
}

.list {
    background: var(--cream);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    cursor: grab;
}

.list-header h3 {
    color: var(--text-dark);
    font-size: 1rem;
    font-weight: 600;
}

.list-actions {
    display: flex;
    gap: 0.25rem;
}

.cards-list {
    min-height: 50px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.card {
    background: var(--bg-white);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-ghost {
    opacity: 0.5;
    background: var(--mint);
}

.card-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.label-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 500;
}

.card-title {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.card-description {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--sand);
}

.card-meta {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.due-date {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.due-date.overdue {
    color: var(--coral);
}

.card-actions {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--sand);
}

.add-card-btn {
    width: 100%;
    padding: 0.5rem;
    margin-top: 0.75rem;
    background: transparent;
    border: 2px dashed var(--sand);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.add-card-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.add-list-wrapper {
    min-width: 280px;
}

.add-list-btn {
    width: 100%;
    padding: 1rem;
    background: rgba(255,255,255,0.5);
    border: 2px dashed var(--sand);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.add-list-btn:hover {
    border-color: var(--primary-green);
    background: rgba(255,255,255,0.8);
    color: var(--primary-green);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: var(--bg-white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.modal-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
}

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

.label-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.label-form input[type="text"] {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid var(--sand);
    border-radius: var(--radius-sm);
}

.label-form input[type="color"] {
    width: 40px;
    height: 38px;
    border: none;
    cursor: pointer;
}

.label-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.label-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* List ghost for drag */
.list-ghost {
    opacity: 0.5;
    background: var(--mint);
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-brand a {
        font-size: 1.25rem;
    }
    
    main {
        padding: 1rem;
    }
    
    .lists-container {
        padding: 0 0.5rem;
    }
    
    .list-wrapper {
        min-width: 260px;
    }
}