/**
 * Corporate Transfer Platform - Styling
 * Inspired by WeTransfer - Minimalist, modern, fluid, accessible.
 */

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --primary-glow: rgba(79, 70, 229, 0.25);
    --secondary: #0ea5e9;
    --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #311042 100%);
    --card-bg: rgba(255, 255, 255, 0.94);
    --card-border: rgba(226, 232, 240, 0.8);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --border-focus: #6366f1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --radius-lg: 24px;
    --radius-md: 14px;
    --radius-sm: 8px;
    --shadow-card: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-btn: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Background animated glow or mesh */
.bg-ambient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.18) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(236, 72, 153, 0.15) 0%, transparent 40%),
                radial-gradient(circle at 50% 50%, rgba(14, 165, 233, 0.12) 0%, transparent 50%);
}

/* Top Navigation */
.app-header {
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #6366f1, #3b82f6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.brand-icon svg {
    width: 22px;
    height: 22px;
    color: #ffffff;
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-tag {
    font-size: 11px;
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
    color: #e2e8f0;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.header-links a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.header-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

/* Main Container */
.main-wrapper {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    align-items: center;
    padding: 20px 40px 60px 40px;
    gap: 60px;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

/* Transfer Card */
.transfer-card {
    width: 440px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow-card);
    padding: 32px;
    display: flex;
    flex-direction: column;
    min-height: 580px;
    position: relative;
    transition: transform 0.3s ease;
}

/* Dropzone */
.dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-md);
    background: #f8fafc;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: 20px;
}

.dropzone:hover,
.dropzone.drag-active {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.01);
}

.dropzone-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: all 0.2s;
}

.dropzone:hover .dropzone-icon,
.dropzone.drag-active .dropzone-icon {
    background: var(--primary);
    color: #ffffff;
}

.dropzone-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.dropzone-sub {
    font-size: 13px;
    color: var(--text-muted);
}

/* Selected Files List */
.files-preview-container {
    max-height: 180px;
    overflow-y: auto;
    margin-bottom: 18px;
    padding-right: 4px;
}

.files-preview-container::-webkit-scrollbar {
    width: 5px;
}
.files-preview-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: all 0.2s;
}

.file-item:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.file-ext-badge {
    padding: 4px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: #e2e8f0;
    color: #475569;
    flex-shrink: 0;
}

.file-details {
    min-width: 0;
    flex: 1;
}

.file-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 11px;
    color: var(--text-muted);
}

.btn-remove-file {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-remove-file:hover {
    color: var(--danger);
    background: #fee2e2;
}

/* Form Controls */
.form-group {
    margin-bottom: 14px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-main);
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

textarea.form-control {
    resize: none;
    min-height: 70px;
}

/* Tag Inputs (Multi-recipients) */
.recipient-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    min-height: 44px;
    cursor: text;
}

.recipient-tags-container:focus-within {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.email-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2ff;
    color: var(--primary);
    font-size: 12px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 6px;
}

.email-tag button {
    background: none;
    border: none;
    color: #6366f1;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 13px;
    line-height: 1;
}

.recipient-tags-container input {
    border: none;
    outline: none;
    font-size: 13px;
    flex: 1;
    min-width: 140px;
    padding: 4px 0;
    font-family: inherit;
}

/* Accordion Options */
.advanced-options-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    margin-bottom: 12px;
    padding: 0;
    transition: color 0.2s;
}

.advanced-options-toggle:hover {
    color: var(--primary);
}

.advanced-panel {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 12px;
    border: 1px solid var(--border-color);
    margin-bottom: 16px;
    display: none;
}

.advanced-panel.open {
    display: block;
}

/* Primary Action Button */
.btn-transfer {
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: var(--shadow-btn);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: auto;
}

.btn-transfer:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

.btn-transfer:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    box-shadow: none;
}

/* Progress State Overlay / View */
.state-view {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
}

.state-view.active {
    display: flex;
}

.progress-circle-wrap {
    position: relative;
    width: 140px;
    height: 140px;
    margin-bottom: 24px;
}

.progress-circle-svg {
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 8;
}

.progress-circle-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 8;
    stroke-dasharray: 377;
    stroke-dashoffset: 377;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.2s ease;
}

.progress-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    font-weight: 700;
    color: var(--text-main);
}

.progress-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.progress-stat {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.btn-cancel {
    margin-top: 24px;
    background: none;
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    color: var(--danger);
    border-color: var(--danger);
}

/* Success View */
.success-icon-wrap {
    width: 80px;
    height: 80px;
    background: #dcfce7;
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.1);
}

.link-copy-box {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}

.link-copy-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--text-main);
    outline: none;
}

.btn-copy {
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: var(--primary-hover);
}

/* Hero Showcase (Right Side of Page) */
.hero-content {
    flex: 1;
    color: #ffffff;
    max-width: 600px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #e2e8f0;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 18px;
    line-height: 1.6;
    color: #cbd5e1;
    margin-bottom: 32px;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.hero-feature-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.hero-feature-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #38bdf8;
}

.hero-feature-text h4 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.hero-feature-text p {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.4;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .main-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    .hero-content {
        text-align: center;
        max-width: 500px;
    }
    .hero-features {
        grid-template-columns: 1fr;
        text-align: left;
    }
}

@media (max-width: 640px) {
    .app-header {
        padding: 16px 20px;
    }
    .main-wrapper {
        padding: 10px 16px 40px 16px;
    }
    .transfer-card {
        width: 100%;
        padding: 24px 18px;
    }
    .hero-title {
        font-size: 32px;
    }
}
