/* 
 * Streamlined Modern CSS
 * Based on spaPRO Konfigurator Design
 * Version: 2.0.0
 * Date: 2025-10-22
 */

:root {
    --primary-color: #1DA1F2;
    --secondary-color: #0D47A1;
    --success-color: #00BFA5;
    --warning-color: #FFA726;
    --danger-color: #F44336;
    --info-color: #00ACC1;
    --light-bg: #ECF0F1;
    --dark-bg: #0D47A1;
    --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --card-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 15px;
    --transition-speed: 0.3s;
    
    /* Zendesk */
    --zendesk-color: #03363D;
    /* Front */
    --front-color: #5F6DF6;
    /* Fonio */
    --fonio-color: #9B59B6;
    /* WAWI */
    --wawi-color: #E67E22;
    /* Shopify */
    --shopify-color: #96BF48;
}

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

body {
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #111111;
    line-height: 1.5;
    padding: 24px;
}

/* Container */
.container, .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0;
}

/* Header */
.streamlined-header {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 25px 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-logo img {
    width: 50px;
    height: 50px;
}

.header-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 0;
}

.header-sync-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.sync-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.sync-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.sync-btn:hover::before {
    left: 100%;
}

.sync-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-color: #1DA1F2;
}

.sync-btn.syncing {
    pointer-events: none;
    opacity: 0.7;
}

.sync-icon {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sync-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.sync-label {
    font-weight: 600;
    color: var(--secondary-color);
}

.sync-status {
    font-size: 12px;
    color: #7F8C8D;
}

/* Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #1DA1F2, #00ACC1);
    transform: scaleX(0);
    transition: transform var(--transition-speed) ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dashboard-card:hover::before {
    transform: scaleX(1);
}

.dashboard-card.zendesk::before {
    background: linear-gradient(90deg, var(--zendesk-color), #05666F);
}

.dashboard-card.front::before {
    background: linear-gradient(90deg, var(--front-color), #7E8EFF);
}

.dashboard-card.fonio::before {
    background: linear-gradient(90deg, var(--fonio-color), #BB6BD9);
}

.dashboard-card.wawi::before {
    background: linear-gradient(90deg, var(--wawi-color), #F39C12);
}

.dashboard-card.shopify::before {
    background: linear-gradient(90deg, var(--shopify-color), #5E8E3E);
}

.card-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.card-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--light-bg);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--secondary-color);
}

.card-description {
    font-size: 14px;
    color: #7F8C8D;
    margin-top: 10px;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.spinning {
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .streamlined-header {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }
    
    .header-logo h1 {
        font-size: 22px;
    }
    
    .header-sync-buttons {
        flex-direction: column;
    }
    
    .sync-btn {
        width: 100%;
        justify-content: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header-logo img {
        width: 40px;
        height: 40px;
    }
    
    .header-logo h1 {
        font-size: 18px;
    }
    
    .dashboard-card {
        padding: 20px;
    }
    
    .card-icon {
        font-size: 36px;
    }
    
    .card-title {
        font-size: 18px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

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

.login-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--card-shadow-hover);
    width: 100%;
    max-width: 400px;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 16px;
    transition: all var(--transition-speed) ease;
}

.form-control:focus {
    outline: none;
    border-color: #1DA1F2;
    box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1DA1F2 0%, #0D47A1 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.3);
}

/* Logout Button */
.btn-logout {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--danger-color), #C0392B);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* ==================================
   TODO MODAL & SYSTEM
   ================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 2px solid var(--light-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1DA1F2 0%, #0D47A1 100%);
    color: white;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
}

.modal-close {
    font-size: 32px;
    cursor: pointer;
    transition: transform 0.2s;
    line-height: 1;
}

.modal-close:hover {
    transform: scale(1.2) rotate(90deg);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.todo-actions {
    margin-bottom: 20px;
}

.todo-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.todo-item {
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 10px;
    padding: 20px;
    transition: all var(--transition-speed) ease;
}

.todo-item:hover {
    border-color: #1DA1F2;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.todo-item.completed {
    opacity: 0.6;
    background: #f8f9fa;
}

.todo-item.urgent {
    border-left: 5px solid var(--danger-color);
}

.todo-item.high {
    border-left: 5px solid var(--warning-color);
}

.todo-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.todo-header h4 {
    margin: 0;
    font-size: 18px;
    color: var(--secondary-color);
    flex: 1;
}

.todo-actions-inline {
    display: flex;
    gap: 5px;
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 5px;
}

.btn-icon:hover {
    transform: scale(1.2);
}

.todo-description {
    color: #666;
    margin: 10px 0;
    font-size: 14px;
}

.todo-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.todo-meta span {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.todo-status {
    background: var(--light-bg);
    color: var(--secondary-color);
}

.todo-status.completed {
    background: var(--success-color);
    color: white;
}

.todo-status.in_progress {
    background: var(--info-color);
    color: white;
}

.todo-priority.urgent {
    background: var(--danger-color);
    color: white;
}

.todo-priority.high {
    background: var(--warning-color);
    color: white;
}

.todo-due, .todo-assigned {
    background: white;
    border: 1px solid #E0E0E0;
    color: var(--secondary-color);
}

.no-todos, .loading, .error {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

.error {
    color: var(--danger-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

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

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 16px;
    transition: all var(--transition-speed) ease;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: #1DA1F2;
    box-shadow: 0 0 0 3px rgba(29, 161, 242, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    padding: 14px 30px;
    background: #95A5A6;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.btn-secondary:hover {
    background: #7F8C8D;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .todo-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .todo-actions-inline {
        margin-top: 10px;
    }
}

