/* Farm Task Calendar Styles */
:root {
    --primary: #014330;
    --primary-dark: #013023;
    --primary-light: #01563f;
    --secondary: #61CE70;
    --secondary-dark: #4CAF50;
    --secondary-light: #81D483;
    
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border: #e2e8f0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    
    --radius: 8px;
    --radius-lg: 12px;
    
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Container */
.ftc-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.ftc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.ftc-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.ftc-logo i {
    font-size: 2rem;
}

/* Buttons */
.ftc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.ftc-btn-primary {
    background: var(--primary);
    color: white;
}

.ftc-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.ftc-btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.ftc-btn-secondary:hover {
    background: var(--bg-hover);
}

.ftc-btn-success {
    background: var(--secondary);
    color: white;
}

.ftc-btn-success:hover {
    background: var(--secondary-dark);
}

.ftc-nav-btn, .ftc-today-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 8px 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.ftc-nav-btn:hover, .ftc-today-btn:hover {
    background: var(--bg-hover);
}

.ftc-today-btn {
    margin-left: 10px;
    padding: 8px 16px;
}

/* Main Layout */
.ftc-main-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

/* Sidebar */
.ftc-sidebar {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid var(--border);
}

.ftc-sidebar-section {
    margin-bottom: 32px;
}

.ftc-sidebar-section h3 {
    color: var(--primary);
    margin-bottom: 16px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ftc-categories {
    list-style: none;
}

.ftc-category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 4px;
}

.ftc-category-item:hover {
    background: var(--bg-hover);
}

.ftc-category-item.active {
    background: var(--primary);
    color: white;
}

.ftc-category-item i {
    width: 20px;
    text-align: center;
}

/* Stats */
.ftc-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ftc-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius);
    background: var(--bg-primary);
    transition: var(--transition);
}

.ftc-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px var(--shadow);
}

.ftc-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.ftc-stat-icon.pending { background: #fff3cd; color: #856404; }
.ftc-stat-icon.active { background: #cce7ff; color: #004085; }
.ftc-stat-icon.done { background: #d4edda; color: #155724; }

.ftc-stat-info {
    display: flex;
    flex-direction: column;
}

.ftc-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.ftc-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Content Area */
.ftc-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Tabs */
.ftc-tabs {
    display: flex;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px var(--shadow);
}

.ftc-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 14px;
}

.ftc-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.ftc-tab.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px var(--shadow);
}

/* Calendar Section */
.ftc-calendar-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid var(--border);
}

.ftc-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.ftc-calendar-header h3 {
    color: var(--primary);
    font-size: 20px;
    font-weight: 600;
}

.ftc-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.ftc-calendar-day-header {
    background: var(--primary);
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ftc-calendar-day {
    background: var(--bg-secondary);
    padding: 12px;
    min-height: 100px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    border: 1px solid transparent;
}

.ftc-calendar-day:hover {
    background: var(--bg-hover);
    transform: scale(1.02);
    z-index: 2;
    box-shadow: 0 2px 8px var(--shadow);
}

.ftc-calendar-day.other-month {
    background: var(--bg-primary);
    color: var(--text-muted);
}

.ftc-calendar-day.today {
    background: var(--primary);
    color: white;
}

.ftc-calendar-day.today .ftc-day-number {
    color: white;
    font-weight: 700;
}

.ftc-calendar-day.has-task::before {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary);
}

.ftc-day-number {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.ftc-task-item {
    font-size: 11px;
    padding: 4px 6px;
    margin-bottom: 2px;
    border-radius: 4px;
    background: var(--bg-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-left: 2px solid var(--primary);
    transition: var(--transition);
}

.ftc-task-item:hover {
    transform: translateX(2px);
}

/* Task List */
.ftc-task-list-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 2px 8px var(--shadow);
    border: 1px solid var(--border);
}

.ftc-task-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ftc-task-list-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary);
    font-size: 18px;
}

.ftc-task-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.ftc-count-badge {
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 12px;
}

.ftc-tasks-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Task Card */
.ftc-task-card {
    background: var(--bg-primary);
    border-radius: var(--radius);
    padding: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 2px 4px var(--shadow);
    transition: var(--transition);
    position: relative;
    border-left: 4px solid var(--primary);
}

.ftc-task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow);
}

.ftc-task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.ftc-task-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    flex: 1;
}

.ftc-task-priority {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ftc-priority-low { background: #d4edda; color: #155724; }
.ftc-priority-medium { background: #fff3cd; color: #856404; }
.ftc-priority-high { background: #f8d7da; color: #721c24; }

.ftc-task-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.ftc-task-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ftc-status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ftc-status-pending { background: #fff3cd; color: #856404; }
.ftc-status-active { background: #cce7ff; color: #004085; }
.ftc-status-done { background: #d4edda; color: #155724; }

.ftc-task-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ftc-task-actions .ftc-btn {
    padding: 6px 12px;
    font-size: 12px;
}

/* Modal */
.ftc-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.ftc-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.ftc-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px var(--shadow-lg);
    border: 1px solid var(--border);
}

.ftc-modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ftc-modal-header h2 {
    color: var(--primary);
    font-size: 20px;
}

.ftc-close-modal {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ftc-close-modal:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.ftc-modal-body {
    padding: 24px;
}

.ftc-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Forms */
.ftc-form-group {
    margin-bottom: 20px;
}

.ftc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.ftc-form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-primary);
}

.ftc-form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(1, 67, 48, 0.1);
}

.ftc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Priority Options */
.ftc-priority-options {
    display: flex;
    gap: 8px;
}

.ftc-priority-option input {
    display: none;
}

.ftc-priority-option label {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-weight: 500;
    font-size: 13px;
    background: var(--bg-primary);
}

.ftc-priority-option input:checked + label {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.ftc-priority-option label.low { border-left: 3px solid #28a745; }
.ftc-priority-option label.medium { border-left: 3px solid #ffc107; }
.ftc-priority-option label.high { border-left: 3px solid #dc3545; }

/* Category Options */
.ftc-category-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.ftc-category-option input {
    display: none;
}

.ftc-category-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-size: 12px;
    background: var(--bg-primary);
}

.ftc-category-option input:checked + label {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.ftc-category-option label i {
    font-size: 16px;
}

/* Loading */
.ftc-loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.ftc-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.ftc-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.ftc-empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.ftc-empty-state h4 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .ftc-main-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .ftc-sidebar {
        order: 2;
    }
    
    .ftc-content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .ftc-container {
        padding: 16px;
    }
    
    .ftc-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .ftc-calendar-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .ftc-calendar-header > div {
        display: flex;
        justify-content: space-between;
    }
    
    .ftc-tabs {
        flex-wrap: wrap;
    }
    
    .ftc-tab {
        flex: 1 0 calc(50% - 8px);
        font-size: 13px;
    }
    
    .ftc-form-row {
        grid-template-columns: 1fr;
    }
    
    .ftc-category-options {
        grid-template-columns: 1fr;
    }
    
    .ftc-priority-options {
        flex-direction: column;
    }
    
    .ftc-task-actions {
        flex-direction: column;
    }
    
    .ftc-task-actions .ftc-btn {
        justify-content: center;
    }
    
    .ftc-modal-content {
        width: 95%;
        margin: 20px auto;
    }
}

@media (max-width: 480px) {
    .ftc-calendar-day {
        min-height: 80px;
        padding: 8px;
    }
    
    .ftc-task-item {
        font-size: 10px;
        padding: 2px 4px;
    }
    
    .ftc-day-number {
        font-size: 14px;
    }
}

/* Notification */
.ftc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius);
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 1002;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
/* User Info Styles */
.ftc-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ftc-user-info span {
    color: var(--text-secondary);
    font-weight: 500;
}

/* Login Required Message */
.ftc-login-required {
    text-align: center;
    padding: 40px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.ftc-login-required:before {
    content: "🔒";
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}