/* Global Ocean Link Poland Signature Generator — Apple Design System */
:root {
    --apple-bg: #F5F5F7;
    --apple-card: #FFFFFF;
    --apple-card-subtle: #FAFAFC;
    --apple-border: rgba(0, 0, 0, 0.08);
    --apple-border-hover: rgba(0, 0, 0, 0.16);
    --apple-text: #1D1D1F;
    --apple-text-secondary: #86868B;
    --apple-text-tertiary: #A1A1A6;
    --apple-blue: #0071E3;
    --apple-blue-hover: #0077ED;
    --apple-blue-subtle: #F0F6FF;
    --gol-primary: #1F88A8;
    --gol-primary-hover: #176f8a;
    
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 8px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: var(--apple-bg);
    color: var(--apple-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Header */
.app-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--apple-border);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    z-index: 20;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-badge {
    background: var(--gol-primary);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 13px;
    padding: 4px 9px;
    border-radius: var(--radius-sm);
    letter-spacing: 0.8px;
}

.brand-text h1 {
    font-size: 14px;
    font-weight: 600;
    color: var(--apple-text);
    line-height: 1.2;
    letter-spacing: -0.2px;
}

.brand-text span {
    font-size: 11px;
    color: var(--apple-text-secondary);
}

/* Main Body Grid */
.app-body {
    display: grid;
    grid-template-columns: 380px 1fr;
    flex: 1;
    overflow: hidden;
}

/* Left Sidebar Form */
.sidebar-panel {
    background: #FFFFFF;
    border-right: 1px solid var(--apple-border);
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sidebar-panel::-webkit-scrollbar {
    width: 6px;
}

.sidebar-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 10px;
}

.panel-header {
    margin-bottom: 2px;
}

.panel-header h2 {
    font-size: 13px;
    font-weight: 600;
    color: var(--apple-text);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.2px;
}

.panel-header h2 svg {
    color: var(--apple-text-secondary);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.form-group label {
    font-size: 12px;
    font-weight: 500;
    color: var(--apple-text-secondary);
    letter-spacing: -0.1px;
}

.form-group label .req {
    color: #FF3B30;
    margin-left: 2px;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--apple-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--apple-text);
    background: var(--apple-card-subtle);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder {
    color: var(--apple-text-tertiary);
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
    outline: none;
    background: #FFFFFF;
    border-color: var(--gol-primary);
    box-shadow: 0 0 0 3px rgba(31, 136, 168, 0.15);
}

.divider {
    height: 1px;
    background: var(--apple-border);
    margin: 8px 0 14px 0;
}

/* Dropzone Upload */
.file-dropzone {
    border: 1px dashed rgba(0, 0, 0, 0.18);
    border-radius: var(--radius-md);
    padding: 18px 12px;
    text-align: center;
    background: var(--apple-card-subtle);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.file-dropzone:hover, .file-dropzone.dragover {
    border-color: var(--gol-primary);
    background: #F0F9FB;
}

.file-dropzone .file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--apple-text-secondary);
}

.dropzone-content svg {
    color: var(--gol-primary);
    margin-bottom: 2px;
}

.dropzone-content span {
    font-size: 12px;
    font-weight: 500;
    color: var(--apple-text);
}

.dropzone-content small {
    font-size: 11px;
    color: var(--apple-text-tertiary);
}

/* Photo Controls */
.photo-controls {
    background: var(--apple-card-subtle);
    border: 1px solid var(--apple-border);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: -4px;
}

.control-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.control-row label {
    font-size: 11px;
    font-weight: 500;
    color: var(--apple-text-secondary);
    display: flex;
    justify-content: space-between;
}

.control-row label span {
    color: var(--apple-text);
    font-weight: 600;
}

/* Custom Apple Range Slider */
.control-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.control-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 0.5px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
    cursor: pointer;
    transition: transform 0.1s ease;
}

.control-row input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.control-row input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 0.5px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
    cursor: pointer;
}

/* Process Button */
.process-btn-wrap {
    margin-top: 6px;
}

.btn-process {
    width: 100%;
    height: 42px;
    background: var(--gol-primary);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(31, 136, 168, 0.25);
}

.btn-process:hover {
    background: var(--gol-primary-hover);
    box-shadow: 0 4px 14px rgba(31, 136, 168, 0.35);
    transform: translateY(-1px);
}

.btn-process:active {
    transform: translateY(0);
}

/* Right Preview Panel */
.preview-panel {
    display: flex;
    flex-direction: column;
    background: var(--apple-bg);
    height: 100%;
    overflow: hidden;
}

/* Tabs (Apple Segmented Control) */
.tabs-header {
    background: transparent;
    display: flex;
    padding: 16px 28px 0 28px;
    gap: 6px;
}

.tab-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--apple-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: var(--apple-text);
    background: rgba(0, 0, 0, 0.04);
}

.tab-btn.active {
    color: var(--apple-text);
    background: #FFFFFF;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.tabs-content {
    flex: 1;
    overflow-y: auto;
    padding: 32px 28px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.tab-pane {
    display: none;
    width: 100%;
    max-width: 680px;
}

.tab-pane.active {
    display: block;
}

/* Card Stage Container */
.card-stage-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
}

.card-render-wrapper {
    margin: 0 auto;
    background: transparent;
    padding: 6px;
}

/* THE HTML EMPLOYEE CARD EXACT STYLING */
.gol-card-box {
    width: 600px;
    max-width: 600px;
    font-family: 'Segoe UI', Arial, sans-serif;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #E1E1E1;
    box-shadow: rgba(0, 0, 0, 0.06) 0px 4px 16px;
    background-color: #FFFFFF;
    margin: 0 auto;
}

.gol-card-header {
    background-color: #1F88A8;
    height: 85px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.gol-logo-wrap {
    text-align: right;
}

.gol-logo-svg {
    height: 48px;
    width: auto;
}

.gol-card-body {
    display: flex;
    padding: 18px 20px;
    align-items: center;
    gap: 16px;
    background: #FFFFFF;
    position: relative;
}

.gol-photo-col {
    width: 115px;
    flex-shrink: 0;
}

.gol-photo-frame {
    width: 110px;
    height: 110px;
    border-radius: 14px;
    overflow: hidden;
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    will-change: transform;
}

.gol-employee-img {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    max-width: none;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    transition: transform 0.05s ease;
}

.gol-employee-img.hidden {
    display: none;
}

.gol-photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #94A3B8;
    font-size: 10px;
    text-align: center;
    padding: 10px;
}

.gol-info-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gol-name {
    font-size: 18px;
    font-weight: 700;
    color: #1E293B;
    line-height: 1.2;
    margin-bottom: 2px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.gol-title {
    font-size: 13px;
    font-weight: 600;
    color: #1F88A8;
    margin-bottom: 10px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.gol-details-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #6E7275;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.detail-row .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
}

.detail-row .val {
    color: #6E7275;
    font-weight: 400;
}

.gol-socials-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 10px;
    border-left: 1px solid #F1F5F9;
}

.soc-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #F0F9FF;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.soc-btn:hover {
    transform: scale(1.1);
    background: #E0F2FE;
}

/* Email Mock Preview */
.email-client-mock {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--apple-border);
    overflow: hidden;
}

.email-mock-header {
    background: #FAFAFC;
    padding: 12px 18px;
    border-bottom: 1px solid var(--apple-border);
    display: flex;
    align-items: center;
    gap: 14px;
}

.email-dots {
    display: flex;
    gap: 6px;
}

.email-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.email-dots span:nth-child(1) { background: #FF5F56; }
.email-dots span:nth-child(2) { background: #FFBD2E; }
.email-dots span:nth-child(3) { background: #27C93F; }

.email-title {
    font-size: 12px;
    color: var(--apple-text-secondary);
    font-weight: 500;
}

.email-mock-body {
    padding: 30px;
    background: #FFFFFF;
    min-height: 340px;
    font-family: 'Calibri', 'Segoe UI', Arial, sans-serif;
    font-size: 14px;
}

/* Code Editor Preview */
.code-editor-box {
    background: #1C1C1E;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.code-editor-box textarea {
    width: 100%;
    height: 380px;
    background: transparent;
    border: none;
    color: #64D2FF;
    font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    padding: 20px;
    resize: none;
    line-height: 1.6;
}

.code-editor-box textarea:focus {
    outline: none;
}

/* Action Bar Bottom */
.action-bar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--apple-border);
    padding: 12px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
}

button {
    cursor: pointer;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.btn-primary {
    background: var(--gol-primary);
    color: #FFFFFF;
    padding: 9px 16px;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(31, 136, 168, 0.25);
}

.btn-primary:hover {
    background: var(--gol-primary-hover);
    box-shadow: 0 4px 12px rgba(31, 136, 168, 0.35);
}

.btn-success {
    background: var(--gol-primary);
    color: #FFFFFF;
    padding: 9px 18px;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(31, 136, 168, 0.25);
}

.btn-success:hover {
    background: var(--gol-primary-hover);
    box-shadow: 0 4px 12px rgba(31, 136, 168, 0.35);
}

.btn-secondary {
    background: #FFFFFF;
    color: var(--apple-text);
    border: 1px solid var(--apple-border);
    padding: 9px 16px;
    font-size: 12.5px;
}

.btn-secondary:hover {
    background: var(--apple-card-subtle);
    border-color: var(--apple-border-hover);
}

.btn-sm {
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 6px;
    align-self: flex-start;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(29, 29, 31, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 12.5px;
    font-weight: 500;
    box-shadow: var(--shadow-hover);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.hidden {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}

/* Utility */
.hidden { display: none !important; }
