/* Raleway Font Face Declarations */
@font-face {
    font-family: 'Raleway';
    src: url('/fonts/Raleway-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Raleway';
    src: url('/fonts/Raleway-Italic-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

/* CSS Variables */
:root {
    --transition-standard: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Light mode colors */
    --shadow-standard: 0 8px 30px rgba(30, 58, 138, 0.15);
    --shadow-elevated: 0 20px 40px rgba(30, 64, 175, 0.2);
    --color-primary: rgb(0, 112, 188);
    --color-secondary: #1e3a8a;
    --color-background: linear-gradient(135deg, #b2d235 0%, #4d88e9 100%);
    --color-accent: var(--color-primary);
    --color-surface: rgba(255, 255, 255, 0.95);
    --color-button: #b2d235;
    --color-button-hover: #4d88e9;
    --color-text: #1a202c;
    --color-text-secondary: #666;
    --color-border: rgba(0, 112, 188, 0.1);
    --color-ruler: var(--color-primary);

    --font-main: "Raleway", "Helvetica Neue", "Arial", sans-serif !important;
    --font-secondary:
        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        sans-serif;
}

[data-theme="dark"] {
    --shadow-standard: 0 8px 30px rgba(0, 0, 0, 0.4);
    --shadow-elevated: 0 20px 40px rgba(0, 0, 0, 0.6);
    --color-primary: rgb(0, 112, 188);
    --color-secondary: #1e1b4b;
    --color-background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --color-accent: var(--color-primary);
    --color-surface: rgba(30, 30, 46, 0.95);
    --color-button: #b2d235;
    --color-button-hover: #4d88e9;
    --color-text: #e2e8f0;
    --color-text-secondary: #94a3b8;
    --color-border: rgba(0, 112, 188, 0.2);
    --color-ruler: var(--color-primary);
    --color-form-bg: rgb(40, 40, 45);
    --color-form-text: rgb(110, 110, 115);
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-background);
    min-height: 100vh;
}

/* Container and layout */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 2rem 0 1rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-surface);
    backdrop-filter: blur(10px);
    padding: 1.25rem 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-standard);
    position: relative;
    border: 1px solid var(--color-border);
}

/* Logo styling */
.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
    margin-right: 2rem;
    overflow: visible;
    flex-shrink: 0;
    position: relative;
}

.header-logos-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-title-row {
    display: flex;
    justify-content: center;
    gap: 0;
}

.header-logo-link {
    display: block;
    text-decoration: none;
}

.header-logo {
    max-height: 55px;
    max-width: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.header-logo:hover {
    transform: scale(1.05);
}

.coughdrop-logo {
    max-height: 60px;
    max-width: 200px;
}

.forbes-logo {
    max-height: 50px;
    max-width: 150px;
    opacity: 0.9;
}

.title {
    display: block;
    text-align: center;
    margin: 0.25rem 0 0 0;
}

.title-svg {
    height: 28px;
    width: auto;
    max-width: 400px;
    transition: transform 0.3s ease;
}

.title-svg:hover {
    transform: scale(1.05);
}

.header-title {
    flex: 1;
    text-align: center;
}

.header-title h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary) 0%, #4d88e9 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

[data-theme="dark"] .header-title h1 {
    background: linear-gradient(135deg, #b2d235 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-secondary);
}

.welcome {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    padding-right: 0.75rem;
    border-right: 1px solid var(--color-border);
    margin-right: 0.75rem;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    background: var(--color-button);
    color: white;
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.logout-btn:hover {
    background: var(--color-button-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Dark mode toggle */
.dark-mode-toggle {
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    margin: 0 0.5rem;
}

.login-theme-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    margin: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .login-theme-toggle {
    background: rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.dark-mode-toggle:hover {
    background: var(--color-surface-hover, rgba(0, 0, 0, 0.05));
    border-color: var(--color-border-hover, var(--color-border));
}

[data-theme="dark"] .dark-mode-toggle {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .dark-mode-toggle:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
}

.dark-mode-icon::before {
    content: "🌙";
}

[data-theme="dark"] .dark-mode-icon::before {
    content: "☀️";
}

.dark-mode-icon {
    display: block;
}

/* Main content */
.main {
    flex: 1;
    padding: 2rem 0;
}

/* Tools grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tool-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s ease-out;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0, 112, 188, 0.2);
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .tool-card {
    background: var(--color-surface);
    border-color: var(--color-border);
}

[data-theme="dark"] .tool-icon {
    background:
        linear-gradient(135deg, #0070bc 0%, #1e3a8a 100%),
        radial-gradient(
            circle at 30% 30%,
            rgba(255, 255, 255, 0.2) 0%,
            transparent 50%
        ) !important;
    box-shadow:
        0 4px 15px rgba(0, 112, 188, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        inset 0 -1px 0 rgba(0, 0, 0, 0.2) !important;
}

/* Custom sizing for specific tool icons */
.tool-icon img[src*="mailpit"] {
    width: 42% !important;
    height: 42% !important;
}

.tool-icon img[src*="coughdrop-drops"] {
    width: 45% !important;
    height: 45% !important;
}

.tool-card:hover {
    transform: translateY(-3px) scale(1.015);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--color-primary);
}

[data-theme="dark"] .tool-card:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
    border-color: var(--color-primary);
}

/* Disabled tool styling */
.tool-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
    filter: grayscale(80%);
}

[data-theme="dark"] .tool-disabled {
    opacity: 0.3;
    background: rgba(60, 60, 60, 0.5);
}

.tool-card:hover .tool-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.tool-card.placeholder {
    opacity: 0.6;
    cursor: default;
    background: rgba(255, 255, 255, 0.7);
}

.tool-disabled:hover {
    transform: none !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1) !important;
}

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.tool-icon img {
    width: 50%;
    height: 50%;
    object-fit: contain;
}

.tool-info {
    flex: 1;
    margin-bottom: 1rem;
}

.tool-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.tool-description {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.tool-arrow {
    color: #3498db;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateX(-10px);
}

.tool-card:hover .tool-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Login page styles */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .login-card {
    background: var(--color-surface);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--color-border);
}

[data-theme="dark"] .login-btn {
    background: 
        linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary) 50%, var(--color-secondary) 100%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    box-shadow: 
        0 4px 15px rgba(0, 112, 188, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Dark mode hover effect removed as requested */

@keyframes shimmer {
    0% {
        transform: translate(-50%, -50%) rotate(45deg);
    }
    100% {
        transform: translate(50%, 50%) rotate(45deg);
    }
}

.fake-login-btn {
    background: var(--color-button);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background 0.2s ease;
    display: inline-block;
}

/* Fake login hover effect removed as requested */

[data-theme="dark"] .fake-login-btn {
    background: 
        linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary) 50%, var(--color-secondary) 100%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    box-shadow: 
        0 4px 15px rgba(0, 112, 188, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

/* Dark mode fake login hover effect removed as requested */

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-top {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 1rem;
    position: relative;
}

.login-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    flex: 1;
}

.login-logos-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.login-title-svg {
    height: 20px;
    width: auto;
    max-width: 280px;
    transition: transform 0.3s ease;
    margin: 0 auto 1rem;
    display: block;
}

.login-subtitle-main {
    display: block;
    position: relative;
    padding-top: 1rem;
    margin-top: 0;
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 500;
}

.login-subtitle-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, 
                rgba(0, 0, 0, 0.1) 0%, 
                rgba(0, 0, 0, 0.7) 50%, 
                rgba(0, 0, 0, 0.1) 100%);
    border-radius: 1px;
}

[data-theme="dark"] .login-subtitle-main::before {
    background: linear-gradient(to right, 
                rgba(255, 255, 255, 0.1) 0%, 
                rgba(255, 255, 255, 0.5) 50%, 
                rgba(255, 255, 255, 0.1) 100%);
}

.login-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--color-text);
    font-size: 0.9rem;
}

.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.login-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 0.75rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
    color: var(--color-text);
}

[data-theme="dark"] .form-input {
    background: var(--color-form-bg, rgb(40, 40, 45));
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.form-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    transform: translateY(-1px);
}

.floating-label-text {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    color: #999;
    font-size: 1rem;
}

[data-theme="dark"] .floating-label-text {
    color: var(--color-form-text, rgb(110, 110, 115));
}

.form-group.focused .floating-label-text,
.form-group.has-value .floating-label-text {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    color: #3498db;
    background: white;
    padding: 0 0.5rem;
    font-weight: 500;
}

[data-theme="dark"] .form-group.focused .floating-label-text,
[data-theme="dark"] .form-group.has-value .floating-label-text {
    background: var(--color-form-bg, rgb(40, 40, 45));
    color: var(--color-primary);
}

.form-group.floating-label input::placeholder {
    color: transparent;
}

.form-group.focused .form-input {
    border-color: #3498db;
}

.form-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #666;
    line-height: 1.3;
}

.login-btn {
    width: 100%;
    background: var(--color-button);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

/* Hover effect removed as requested */

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login-footer {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
    line-height: 1.4;
}

/* Staging Tool Styling */
.staging-tool {
    position: relative;
}

.tool-status-dot {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 3;
    transition: all 0.3s ease;
}

.tool-status-dot.green {
    background: #4caf50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.4);
}

.tool-status-dot.red {
    background: #f44336;
    box-shadow: 0 0 8px rgba(244, 67, 54, 0.4);
}

.tool-status-dot.gray {
    background: #9e9e9e;
    box-shadow: 0 0 8px rgba(158, 158, 158, 0.4);
}

/* Error state buttons */
.error-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.error-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.destroy-btn {
    background: #f44336;
    color: white;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.destroy-btn:hover {
    background: #d32f2f;
    box-shadow: 0 6px 16px rgba(244, 67, 54, 0.4);
    transform: translateY(-2px);
}

.apply-btn {
    background: #4caf50;
    color: white;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.apply-btn:hover {
    background: #45a049;
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}


.tool-toggle {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 13px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0.25rem;
}

.toggle-switch.active {
    background: rgba(16, 185, 129, 0.8);
}

.toggle-slider {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.toggle-switch.active .toggle-slider {
    transform: translateX(24px);
}

.toggle-switch:disabled,
.toggle-switch.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.toggle-switch:disabled .toggle-slider,
.toggle-switch.disabled .toggle-slider {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.toggle-label {
    font-weight: 600;
    color: rgba(0, 0, 0, 0.9);
    text-shadow: none;
    font-size: 0.8rem;
    min-height: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.staging-tool.disabled .toggle-label {
    opacity: 0.6;
}

[data-theme="dark"] .toggle-label {
    color: rgba(255, 255, 255, 0.9);
}

/* Footer styling */
.footer {
    text-align: center;
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
    opacity: 0.4;
}

.footer-logo {
    max-height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
    transition: opacity 0.3s ease;
}

.footer-logo:hover {
    opacity: 0.8;
}

[data-theme="dark"] .footer-logo {
    filter: brightness(0) invert(0.8);
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tool-card {
        padding: 1.5rem;
    }

    .tool-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }
}

/* Animation for page load */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse animation for progress bars */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.tool-card:nth-child(2) {
    animation-delay: 0.1s;
}

.tool-card:nth-child(3) {
    animation-delay: 0.2s;
}

.tool-card:nth-child(4) {
    animation-delay: 0.3s;
}
