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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #031987 0%, #1e40af 50%, #3b82f6 100%);
    color: #fff;
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2.5em;
    font-weight: 300;
}

h2 {
    color: #34495e;
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 400;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
    font-size: 0.9em;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 40px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    color: #031987;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    background: #031987;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(3, 25, 135, 0.4), 0 4px 15px rgba(255, 255, 255, 0.1);
    border-color: #031987;
}

.btn-secondary {
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.3), rgba(219, 234, 254, 0.2));
    color: white;
    border: 2px solid rgba(147, 197, 253, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #ffffff, #f1f5f9);
    color: #031987;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(147, 197, 253, 0.4), 0 2px 10px rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: 2px solid #10b981;
}

.btn-success:hover {
    background: linear-gradient(135deg, #ffffff, #f0fdf4);
    color: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3), 0 2px 10px rgba(134, 239, 172, 0.2);
}

.preview-section {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.row-counter {
    background-color: #ecf0f1;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.preview-table {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

#dataTable {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

#dataTable th {
    background-color: #34495e;
    color: white;
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85em;
    white-space: nowrap;
    border-bottom: 2px solid #2c3e50;
}

#dataTable td {
    padding: 12px 10px;
    border-bottom: 1px solid #e1e8ed;
    font-size: 0.9em;
    white-space: nowrap;
    color: #2c3e50;
}

#dataTable tbody tr:hover {
    background-color: #f8f9fa;
}

#dataTable tbody tr:nth-child(even) {
    background-color: #f1f2f6;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background-color 0.3s ease;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-style: italic;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    h1 {
        font-size: 2em;
    }

    .button-group {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    #dataTable {
        font-size: 0.8em;
    }

    #dataTable th,
    #dataTable td {
        padding: 8px 5px;
    }
}

/* Form Validation Styles */
.error {
    border: 2px solid #e74c3c !important;
    background-color: #fdf2f2 !important;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85em;
    margin-top: 5px;
    padding: 5px;
    background-color: #fdf2f2;
    border-left: 3px solid #e74c3c;
    border-radius: 3px;
    display: block;
}

/* Status Message Styles */
.status-message {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

.status-success {
    background-color: #d5f4e6;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.status-error {
    background-color: #fdf2f2;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.status-info {
    background-color: #ebf3fd;
    color: #3498db;
    border: 1px solid #3498db;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Landing Page Styles */
.main-header {
    text-align: center;
    margin-bottom: 5px;
    padding: 5px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
}

.main-logo {
    width: 100%;
    max-width: 2400px;
    max-height: 1200px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.main-title {
    font-size: 3.5em;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.main-subtitle {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    margin: 0;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.tool-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 15px rgba(59, 130, 246, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 2px solid rgba(147, 197, 253, 0.3);
    backdrop-filter: blur(15px);
    cursor: pointer;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 8px 25px rgba(59, 130, 246, 0.2);
    background: linear-gradient(145deg, rgba(255, 255, 255, 1), rgba(239, 246, 255, 0.98));
    border-color: rgba(59, 130, 246, 0.4);
}

.tool-icon {
    font-size: 4em;
    margin-bottom: 20px;
    display: block;
}

.tool-card h3 {
    color: #031987;
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 600;
}

.tool-card p {
    color: #6b7280;
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 25px;
}

.tool-btn {
    padding: 15px 35px;
    font-size: 1.1em;
    font-weight: 600;
    min-width: 150px;
}

.btn-disabled {
    background-color: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled:hover {
    background-color: #bdc3c7;
    transform: none;
    box-shadow: none;
}

.footer {
    text-align: center;
    padding: 30px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9em;
}

/* Tool Header Styles */
.tool-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.tool-header h1 {
    margin: 0;
    flex: 1;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
    font-weight: 700;
    font-size: 2.2em;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    pointer-events: none;
}

.tool-header .btn {
    padding: 10px 20px;
    font-size: 0.9em;
    position: relative;
    z-index: 10;
}

/* Responsive Design for Landing Page */
@media (max-width: 768px) {
    .main-logo {
        max-width: 800px;
        max-height: 400px;
    }

    .main-title {
        font-size: 2.5em;
    }

    .main-subtitle {
        font-size: 1.1em;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tool-card {
        padding: 30px 20px;
    }

    .tool-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .tool-header h1 {
        font-size: 1.8em;
        position: static;
        transform: none;
        text-align: left;
        width: auto;
        pointer-events: auto;
    }

    .tool-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Cost Projection Tool Styles */
.cost-tool-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 15px rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(147, 197, 253, 0.3);
    backdrop-filter: blur(15px);
}

.form-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.calculate-btn {
    width: 100%;
    margin-bottom: 30px;
    font-size: 18px;
    padding: 15px 30px;
}

.results {
    background: linear-gradient(145deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.95));
    border-radius: 15px;
    padding: 30px;
    margin-top: 20px;
    border: 1px solid rgba(147, 197, 253, 0.2);
}

.results h3 {
    color: #031987;
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.6em;
    font-weight: 700;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 20px;
    background: rgba(3, 25, 135, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(3, 25, 135, 0.2);
}

.result-client {
    font-weight: 700;
    color: #031987;
    font-size: 1.2em;
}

.result-date {
    font-weight: 600;
    color: #6b7280;
    font-size: 1em;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(147, 197, 253, 0.2);
}

.result-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.3em;
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
}

.result-label {
    font-weight: 600;
    color: #374151;
}

.result-value {
    font-weight: 700;
    color: #031987;
    font-size: 1.1em;
}

.result-item:last-child .result-value {
    color: #10b981;
}

.hidden {
    display: none;
}

/* Responsive for Cost Tool */
@media (max-width: 768px) {
    .form-section {
        grid-template-columns: 1fr;
    }

    .cost-tool-container {
        padding: 25px;
    }

    .results {
        padding: 20px;
    }

    .result-item:last-child {
        padding: 15px;
    }
}

/* Client Company Tool Styles */
.btn.append-full-width {
    width: 100% !important;
    font-size: 18px !important;
    padding: 18px 30px !important;
    font-weight: 700 !important;
    background: #031987 !important;
    background-color: #031987 !important;
    color: white !important;
    border: 4px solid white !important;
    box-shadow: 0 4px 15px rgba(3, 25, 135, 0.3), 0 2px 8px rgba(255, 255, 255, 0.2) !important;
}

.btn.append-full-width:hover {
    background: #2563eb !important;
    background-color: #2563eb !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(3, 25, 135, 0.4), 0 4px 15px rgba(255, 255, 255, 0.3) !important;
    border: 4px solid white !important;
}

.search-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 15px rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(147, 197, 253, 0.3);
    backdrop-filter: blur(15px);
}

.search-section h2 {
    color: #031987;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5em;
    font-weight: 600;
}

.search-form {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

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

.search-btn {
    padding: 12px 25px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    background-color: #031987 !important;
    color: white !important;
    border: 3px solid white !important;
    box-shadow: 0 4px 15px rgba(3, 25, 135, 0.3), 0 2px 8px rgba(255, 255, 255, 0.2);
}

.search-btn:hover {
    background: #2563eb !important;
    background-color: #2563eb !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(3, 25, 135, 0.4), 0 4px 15px rgba(255, 255, 255, 0.3) !important;
    border-color: white !important;
}

.search-results-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15), 0 4px 15px rgba(59, 130, 246, 0.1);
    border: 2px solid rgba(147, 197, 253, 0.3);
    backdrop-filter: blur(15px);
}

.search-results-header {
    padding: 10px 15px;
    background: rgba(3, 25, 135, 0.1);
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #031987;
}

.search-results-table {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
}

#searchTable {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 0.9em;
}

#searchTable th {
    background-color: #031987;
    color: white;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85em;
    white-space: nowrap;
}

#searchTable td {
    padding: 10px 8px;
    border-bottom: 1px solid #e1e8ed;
    font-size: 0.85em;
    white-space: nowrap;
    color: #2c3e50;
}

#searchTable tbody tr:hover {
    background-color: #f8f9fa;
}

#searchTable tbody tr:nth-child(even) {
    background-color: #f1f2f6;
}

.session-header {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.5em;
    font-weight: 400;
}

.export-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid rgba(147, 197, 253, 0.2);
}

.export-buttons .btn {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    min-width: 150px;
}

.export-buttons .btn:first-child {
    background-color: #031987 !important;
    color: white !important;
    border: 3px solid white !important;
    box-shadow: 0 4px 15px rgba(3, 25, 135, 0.3), 0 2px 8px rgba(255, 255, 255, 0.2);
}

.export-buttons .btn:first-child:hover {
    background: #2563eb !important;
    background-color: #2563eb !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(3, 25, 135, 0.4), 0 4px 15px rgba(255, 255, 255, 0.3) !important;
    border-color: white !important;
}

.export-buttons .btn:last-child:hover {
    background: #16a085 !important;
    background-color: #16a085 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4), 0 4px 15px rgba(39, 174, 96, 0.2) !important;
    border: 3px solid #16a085 !important;
}

/* Responsive for Company Tool */
@media (max-width: 768px) {
    .search-form {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .search-btn {
        width: 100%;
    }

    .export-buttons {
        flex-direction: column;
        align-items: center;
    }

    .export-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .search-section {
        padding: 20px;
    }

    #searchTable th,
    #searchTable td {
        padding: 8px 5px;
        font-size: 0.8em;
    }
}