/* ==========================================================================
   PRODUCT SPEC COMPANY STYLES
   ========================================================================== */
:root {
    --primary: #1e3a8a;
    --primary-light: #2563eb;
    --gray-bg: #f8fafc;
    --border: #cbd5e1;
    --text: #0f172a;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background: var(--gray-bg);
    color: var(--text);
    padding: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.4;
    margin: 0;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

h1 {
    color: var(--primary);
    margin-top: 0;
    margin-bottom: 16px;
    font-size: 1.75rem;
    word-break: break-word;
}

.card {
    background: #fff;
    border: 1px solid var(--border);
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.company-form-row {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.company-input-group {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 600;
    font-size: 0.875rem;
    color: #334155;
    margin-bottom: 6px;
}

input[type="text"] {
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
    width: 100%;
    box-sizing: border-box;
}

/* ==========================================================================
   TABLES & BUTTONS
   ========================================================================== */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid var(--border);
    padding: 8px 10px;
    text-align: left;
    font-size: 0.875rem;
}

th {
    background: #f1f5f9;
    color: var(--primary);
}

.btn {
    padding: 6px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #64748b;
    color: #ffffff;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff;
}

    .btn-primary:hover {
        background-color: var(--primary-light);
    }

.btn-danger {
    background-color: #dc2626;
    color: #ffffff;
}

    .btn-danger:hover {
        background-color: #ef4444;
    }

/* ==========================================================================
   MEDIA QUERIES (MOBILE RESPONSIVENESS)
   ========================================================================== */
@media (max-width: 600px) {
    body {
        padding: 6px;
    }

    .card {
        padding: 12px;
        margin-bottom: 12px;
    }

    .company-form-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .company-input-group {
        width: 100%;
    }

    .btn,
    input[type="text"] {
        min-height: 42px;
        font-size: 16px;
        width: 100%;
    }

    /* Transform Table to Mobile Cards */
    table {
        border: 0;
        display: block;
    }

        table thead {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            border: 0;
        }

        table tbody {
            display: block;
            width: 100%;
        }

        table tr {
            display: block;
            border: 1px solid var(--border);
            border-radius: 6px;
            margin-bottom: 10px;
            padding: 10px;
            background: #ffffff;
        }

        table td {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            align-items: stretch;
            border: none;
            border-bottom: 1px solid #e2e8f0;
            padding: 6px 0;
            width: 100% !important;
        }

            table td:last-child {
                border-bottom: 0;
                padding-top: 10px;
                flex-direction: row;
                gap: 8px;
            }

            table td::before {
                content: attr(data-label);
                font-weight: 700;
                color: var(--primary);
                margin-bottom: 2px;
                text-transform: uppercase;
                font-size: 0.75rem;
            }

            table td:last-child::before {
                display: none;
            }

            table td:last-child .btn {
                flex: 1;
            }
}
