/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    margin: 0;
}

.header h1 a {
    color: #6f42c1;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

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

.nav a {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav a:hover {
    background-color: #f8f9fa;
    color: #6f42c1;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 1rem;
    border-left: 1px solid #dee2e6;
}

.user-menu span {
    font-weight: 500;
}

/* Main Content */
.main {
    flex: 1;
    padding: 2rem 0;
    min-height: calc(100vh - 120px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #6f42c1;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: center;
}

.btn:hover {
    background: #5a359a;
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: #007bff;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-danger {
    background: #dc3545;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #495057;
}

.form-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #6f42c1;
    box-shadow: 0 0 0 2px rgba(111, 66, 193, 0.1);
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    max-width: 400px;
    width: 100%;
}

.login-box h2 {
    margin-bottom: 1rem;
    color: #495057;
}

.login-box p {
    margin-bottom: 2rem;
    color: #6c757d;
}

.features {
    margin-top: 2rem;
    text-align: left;
}

.features h3 {
    margin-bottom: 1rem;
    color: #495057;
}

.features ul {
    list-style: none;
    padding: 0;
}

.features li {
    margin-bottom: 0.5rem;
    color: #6c757d;
}

/* Dashboard */
.dashboard {
    max-width: 800px;
    margin: 0 auto;
}

.welcome {
    margin-bottom: 2rem;
    text-align: center;
}

.welcome h2 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.dashboard-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.section-header h3 {
    color: #495057;
    margin: 0;
}

.items-list {
    space-y: 1rem;
}

.item-summary {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.item-summary strong {
    color: #495057;
}

.item-summary p {
    margin: 0.25rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.item-summary small {
    color: #adb5bd;
    font-size: 0.8rem;
}

.empty-state {
    text-align: center;
    color: #6c757d;
    padding: 2rem;
    font-style: italic;
}

.quick-actions {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quick-actions h3 {
    margin-bottom: 1rem;
    color: #495057;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* Page Headers */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h2 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: #6c757d;
}

/* Add Forms */
.add-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.add-form h3 {
    margin-bottom: 1.5rem;
    color: #495057;
}

/* Entries Section */
.entries-section {
    max-width: 800px;
    margin: 0 auto;
}

.entries-section h3 {
    margin-bottom: 1.5rem;
    color: #495057;
    text-align: center;
}

/* Items */
.food-item, .poop-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.item-content {
    flex: 1;
}

.item-content h4 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.item-content h3 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.item-content p {
    margin-bottom: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.item-content small {
    color: #adb5bd;
    font-size: 0.8rem;
}

.bristol-description {
    font-style: italic;
    color: #6f42c1 !important;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

/* Bristol Scale Info */
.bristol-scale-info {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.bristol-scale-info h3 {
    margin-bottom: 1rem;
    color: #495057;
    text-align: center;
}

.scale-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.5rem;
}

.scale-item {
    padding: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.scale-item strong {
    color: #495057;
}

/* Footer */
.footer {
    background: #fff;
    border-top: 1px solid #e9ecef;
    padding: 1rem 0;
    margin-top: 2rem;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        order: 1;
    }
    
    .food-item, .poop-item {
        flex-direction: column;
        gap: 1rem;
    }
    
    .item-actions {
        margin-left: 0;
        justify-content: flex-start;
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .scale-grid {
        grid-template-columns: 1fr;
    }
}

/* Tags */
.tags {
    margin: 0.5rem 0;
}

.tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
}

.tags-input-container {
    position: relative;
}

.tags-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ced4da;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 10;
}

.tag-suggestion {
    padding: 0.5rem;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
}

.tag-suggestion:hover {
    background: #f8f9fa;
}

.help-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Urgency Indicators */
.urgency-indicator {
    font-weight: 600;
    padding: 0.25rem 0;
}

.urgency-1, .urgency-2, .urgency-3 {
    color: #28a745; /* Low - Green */
}

.urgency-4, .urgency-5, .urgency-6 {
    color: #ffc107; /* Medium - Yellow/Orange */
}

.urgency-7, .urgency-8, .urgency-9, .urgency-10 {
    color: #dc3545; /* High - Red */
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .main {
        padding: 1rem 0;
    }
    
    .add-form {
        padding: 1rem;
    }
    
    .dashboard-section {
        padding: 1rem;
    }
}