/* GraySpace Design System - Monochrome Interface */

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

/* Color Palette - Neumorphic/3D Interface */
:root {
    /* Neumorphic Grayscale Palette */
    --color-background: #e0e5ec;
    --color-surface: #e0e5ec;
    --color-surface-raised: #e0e5ec;
    --color-surface-inset: #d6dbe4;
    --color-surface-elevated: #e8edf4;
    --color-border: #c8ced7;
    --color-border-light: #f1f3f4;
    --color-text-primary: #2c3e50;
    --color-text-secondary: #6c757d;
    --color-text-tertiary: #95a5a6;
    --color-text-muted: #bdc3c7;
    
    /* Neumorphic Shadow Colors */
    --shadow-light: #ffffff;
    --shadow-dark: #a3b1c6;
    
    /* Accent Colors (minimal use) */
    --color-accent: #007acc;
    --color-accent-hover: #005999;
    --color-success: #28a745;
    --color-warning: #ffc107;
    --color-error: #dc3545;
    
    /* Neumorphic Shadows - 3D Emerging Effect (Reduced 50%) */
    --shadow-neumorphic-raised: 
        6px 6px 12px var(--shadow-dark),
        -6px -6px 12px var(--shadow-light);
    --shadow-neumorphic-inset: 
        inset 4px 4px 8px var(--shadow-dark),
        inset -4px -4px 8px var(--shadow-light);
    --shadow-neumorphic-subtle: 
        3px 3px 6px var(--shadow-dark),
        -3px -3px 6px var(--shadow-light);
    --shadow-neumorphic-pressed: 
        inset 2px 2px 4px var(--shadow-dark),
        inset -2px -2px 4px var(--shadow-light);
    --shadow-neumorphic-floating: 
        10px 10px 20px var(--shadow-dark),
        -10px -10px 20px var(--shadow-light);
    
    /* Typography */
    --font-family-primary: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;
    
    /* Border Radius - More refined */
    --radius-xs: 2px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 50px;
}

/* Base Typography */
body {
    font-family: var(--font-family-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background: linear-gradient(135deg, #e8ecf0 0%, #d8dde6 100%);
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0,0,0,0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Typography Hierarchy */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-lg);
    color: var(--color-text-primary);
}

h2 {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--space-md);
    color: var(--color-text-primary);
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
    color: var(--color-text-primary);
}

h4 {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: var(--space-sm);
    color: var(--color-text-secondary);
}

p {
    margin-bottom: var(--space-md);
    color: var(--color-text-primary);
}

p.lead {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

p.small {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    font-weight: 400;
}

/* Layout Components */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl);
    min-height: 100vh;
}

.header {
    text-align: center;
    margin-bottom: var(--space-xxl);
    padding: var(--space-xl);
    background: var(--color-surface-raised);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-neumorphic-raised);
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 60%;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.1) 0%,
        rgba(255,255,255,0) 100%);
    border-radius: var(--radius-lg);
    pointer-events: none;
}

/* Zone Grid Layout */
.zone-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-lg);
    margin-bottom: var(--space-xxl);
    min-height: 600px;
}

.zone {
    background: var(--color-surface-raised);
    border: none;
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    box-shadow: var(--shadow-neumorphic-raised);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
}

.zone:hover {
    box-shadow: var(--shadow-neumorphic-floating);
    transform: translateY(-4px) translateZ(20px);
}

.zone::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, 
        rgba(255,255,255,0.1) 0%,
        rgba(255,255,255,0) 50%,
        rgba(0,0,0,0.02) 100%);
    border-radius: var(--radius-lg);
    pointer-events: none;
}

.zone::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255,255,255,0.3), 
        transparent);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.zone-header {
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

.zone-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--color-text-primary);
}

.zone-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* Specific Zone Layouts */
.library-zone {
    grid-column: 1;
    grid-row: 1;
}

.create-zone {
    grid-column: 2;
    grid-row: 1;
}

.organization-zone {
    grid-column: 3;
    grid-row: 1;
}

.workspace-zone {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 300px;
}

.evaluation-zone {
    grid-column: 1;
    grid-row: 3;
}

.care-zone {
    grid-column: 2;
    grid-row: 3;
}

/* Card Component */
.card {
    background: var(--color-surface-inset);
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-neumorphic-inset);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: var(--space-md);
}

.card:hover {
    box-shadow: var(--shadow-neumorphic-pressed);
    transform: scale(0.98);
}

.card::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(0,0,0,0.1), 
        transparent);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--color-text-primary);
}

/* Button Components */
button {
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--color-surface-raised);
    color: var(--color-text-primary);
    box-shadow: 
        1.5px 1.5px 3px var(--shadow-dark),
        -1.5px -1.5px 3px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 50%;
    background: linear-gradient(180deg, 
        rgba(255,255,255,0.2) 0%,
        rgba(255,255,255,0) 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    pointer-events: none;
}

button:hover {
    box-shadow: 
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
    transform: translateY(-1px);
}

button:active {
    box-shadow: 
        inset 1px 1px 2px var(--shadow-dark),
        inset -1px -1px 2px var(--shadow-light);
    transform: translateY(0.5px) scale(0.99);
}

button:active::before {
    background: linear-gradient(180deg, 
        rgba(0,0,0,0.05) 0%,
        rgba(0,0,0,0) 100%);
}

.btn-primary, .primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
    color: white;
    box-shadow: 
        var(--shadow-neumorphic-subtle),
        inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn-primary:hover, .primary:hover {
    box-shadow: 
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transform: translateY(-1px);
}

.btn-primary:active, .primary:active {
    box-shadow: 
        inset 1px 1px 2px var(--shadow-dark),
        inset -1px -1px 2px var(--shadow-light),
        inset 0 2px 4px rgba(0,0,0,0.2);
    transform: translateY(0.5px) scale(0.99);
}

.btn-secondary {
    background: var(--color-text-secondary);
    color: white;
    border-color: var(--color-text-secondary);
}

.btn-secondary:hover {
    background: var(--color-text-primary);
    border-color: var(--color-text-primary);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--color-border);
}

.btn-text {
    background: transparent;
    border: none;
    padding: var(--space-sm);
}

/* Create Zone Buttons */
.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}

.create-button {
    padding: var(--space-md);
    text-align: center;
}

/* Form Elements */
input, select, textarea {
    font-family: inherit;
    font-size: 0.875rem;
    padding: var(--space-md) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    background: var(--color-surface-inset);
    color: var(--color-text-primary);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-neumorphic-inset);
}

input:hover, select:hover, textarea:hover {
    box-shadow: var(--shadow-neumorphic-pressed);
}

input:focus, select:focus, textarea:focus {
    box-shadow: 
        var(--shadow-neumorphic-inset),
        0 0 0 3px rgba(0, 123, 255, 0.1);
    outline: none;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.search-box {
    display: flex;
    gap: var(--space-sm);
}

.search-box input {
    flex: 1;
}

.template-select {
    width: 100%;
}

/* List Components */
.item-list {
    list-style: none;
}

.item-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

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

/* Task List */
.task-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.task {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: background-color 0.2s ease;
}

.task:hover {
    background: var(--color-surface-secondary);
}

.task.completed {
    opacity: 0.6;
}

.task.completed span {
    text-decoration: line-through;
}

.task input[type="checkbox"] {
    margin: 0;
}

/* Event Items */
.event-item {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.event-time {
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    min-width: 60px;
}

.event-title {
    color: var(--color-text-primary);
    font-size: 0.875rem;
}

/* Workspace Area */
.workspace-area {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.toolbar {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--color-border-light);
}

.workspace-editor {
    flex: 1;
    min-height: 200px;
    resize: vertical;
    font-family: var(--font-family-mono);
    font-size: 0.875rem;
}

/* Progress Components */
.progress-bar {
    width: 100%;
    height: 12px;
    background: var(--color-surface-inset);
    border-radius: var(--radius-pill);
    overflow: hidden;
    margin-bottom: var(--space-sm);
    box-shadow: var(--shadow-neumorphic-inset);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
    transition: width 0.3s ease;
    border-radius: var(--radius-pill);
    box-shadow: 
        0 2px 4px rgba(0,123,255,0.3),
        inset 0 1px 0 rgba(255,255,255,0.3);
}

.progress-text {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    text-align: center;
}

/* Metrics */
.metric-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.metric {
    text-align: center;
}

.metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-xs);
}

.metric-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* Mood Selector */
.mood-selector {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
}

.mood-button {
    font-size: 1.5rem;
    padding: var(--space-md);
    border: none;
    border-radius: 50%;
    background: var(--color-surface-raised);
    box-shadow: 
        1.5px 1.5px 3px var(--shadow-dark),
        -1.5px -1.5px 3px var(--shadow-light);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mood-button:hover {
    box-shadow: 
        5px 5px 10px var(--shadow-dark),
        -5px -5px 10px var(--shadow-light);
    transform: translateY(-1px);
}

.mood-button:active {
    box-shadow: 
        inset 1px 1px 2px var(--shadow-dark),
        inset -1px -1px 2px var(--shadow-light);
    transform: scale(0.98);
}

/* Mindfulness Buttons */
.mindfulness-button {
    display: block;
    width: 100%;
    margin-bottom: var(--space-sm);
    padding: var(--space-md);
    text-align: center;
}

/* Showcase Sections */
.typography-showcase,
.ui-showcase {
    margin-top: var(--space-xxl);
    padding: var(--space-xl);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.element-group {
    margin-bottom: var(--space-xl);
}

.element-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.form-row label {
    font-weight: 500;
    color: var(--color-text-primary);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .zone-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .workspace-zone {
        grid-column: 1 / -1;
    }
    
    .organization-zone {
        grid-column: 1 / -1;
        grid-row: 2;
    }
    
    .evaluation-zone {
        grid-row: 3;
    }
    
    .care-zone {
        grid-row: 3;
    }
}

@media (max-width: 768px) {
    .zone-grid {
        grid-template-columns: 1fr;
    }
    
    .zone {
        grid-column: 1;
    }
    
    .container {
        padding: var(--space-md);
    }
    
    .button-grid {
        grid-template-columns: 1fr;
    }
    
    .metric-grid {
        grid-template-columns: 1fr;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}