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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000000;
    min-height: 100vh;
    padding: 20px;
}

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

.header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1rem;
}

.dashboard {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.add-client-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.add-client-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.input-group {
    flex: 1;
    min-width: 200px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.input-group input:focus {
    outline: none;
    border-color: #dc2626;
}

.btn {
    padding: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    align-self: flex-end;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    background: #dc2626;
    color: white;
    padding: 10px 16px;
}

.btn-primary:hover {
    background: #b91c1c;
}

.btn-icon {
    background: transparent;
    color: #dc2626;
    padding: 6px;
}

.btn-icon:hover {
    background: rgba(220, 38, 38, 0.1);
}

.clients-section {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.clients-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.client-count {
    color: #666;
    font-size: 0.9rem;
    margin-left: 10px;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.client-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    transition: border-color 0.2s;
    position: relative;
}

.client-card:hover {
    border-color: #dc2626;
}

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

.client-info {
    flex: 1;
    min-width: 0;
}

.client-info h3 {
    color: #333;
    font-size: 1.1rem;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workouts-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
}

.workouts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.workouts-title {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.workouts-title:hover {
    color: #333;
}

.workouts-list {
    display: none;
}

.workouts-list.visible {
    display: block;
}

.workout-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.workout-card:hover {
    border-color: #999;
}

.workout-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    cursor: pointer;
    user-select: none;
}

.workout-date {
    font-size: 0.85rem;
    color: #333;
    font-weight: 500;
}

.workout-date-input {
    font-size: 0.85rem;
    color: #333;
    font-weight: 500;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.workout-date-input:focus {
    outline: none;
    border-bottom: 1px solid #dc2626;
}

.workout-date-input:disabled {
    opacity: 0.7;
    cursor: default;
}

.workout-actions {
    display: flex;
    gap: 4px;
}

.workout-content {
    display: none;
    padding: 0 12px 12px 12px;
}

.workout-content.expanded {
    display: block;
}

.workout-textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    overflow: hidden;
    box-sizing: border-box;
}

.workout-textarea:focus {
    outline: none;
    border-color: #dc2626;
}

.workout-textarea[readonly] {
    background-color: #f9f9f9;
    cursor: default;
    opacity: 0.8;
}

.workout-footer {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

.notes-separator {
    height: 1px;
    background-color: #e0e0e0;
    margin: 12px 0 8px 0;
}

.notes-section {
    padding-top: 4px;
}

.notes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notes-title {
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.notes-title:hover {
    color: #333;
}

.notes-content {
    display: none;
}

.notes-content.visible {
    display: block;
}

.notes-textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s;
    overflow: hidden;
    box-sizing: border-box;
}

.notes-textarea:focus {
    outline: none;
    border-color: #dc2626;
}

.notes-textarea[readonly] {
    background-color: #f9f9f9;
    cursor: default;
    opacity: 0.8;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .header p {
        font-size: 0.875rem;
    }

    .dashboard {
        padding: 20px;
        border-radius: 15px;
    }

    .add-client-form {
        flex-direction: column;
    }

    .input-group {
        min-width: 100%;
    }

    .btn-primary {
        width: 100%;
    }

    .clients-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.25rem;
    }

    .dashboard {
        padding: 15px;
    }

    .clients-section h2 {
        font-size: 1.25rem;
    }
}

/* Login Page Styles */
.login-container {
    max-width: 400px;
    margin: 0 auto;
    margin-top: 100px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-form .btn-primary {
    width: 100%;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-header p {
    opacity: 0.9;
    font-size: 1rem;
}
