:root {
    --cipc-blue: #003366;
    --cipc-gold: #CC9900;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    min-height: 100vh;
}

.header {
    background: linear-gradient(135deg, var(--cipc-blue), #002244);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.logo-placeholder {
    background: linear-gradient(45deg, #e0e0e0, #f5f5f5);
    border: 2px dashed var(--cipc-gold);
    border-radius: 8px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-weight: bold;
    margin-bottom: 1rem;
    overflow: hidden;
}

.logo-img {
    max-height: 70px;
    max-width: 100%;
    object-fit: contain;
}

.form-card {
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    border: none;
    margin-bottom: 2rem;
    overflow: hidden;
    background: white;
}

.form-step {
    padding: 2rem;
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.progress-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    background: linear-gradient(90deg, var(--cipc-blue), var(--cipc-gold));
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.nav-pills .nav-link {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    margin: 0 0.25rem;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s;
}

.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--cipc-blue), #002244);
    color: white;
    border-color: var(--cipc-blue);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.25);
}

.btn-cipc {
    background: linear-gradient(135deg, var(--cipc-blue), #002244);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 6px rgba(0, 51, 102, 0.2);
}

.btn-cipc:hover {
    background: linear-gradient(135deg, #002244, #0841d3);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 51, 102, 0.3);
    color: #cc9933;
}

.btn-outline-cipc {
    border: 2px solid var(--cipc-blue);
    color: var(--cipc-blue);
    border-radius: 8px;
    font-weight: 600;
}

.btn-outline-cipc:hover {
    background-color: var(--cipc-blue);
    color: white;
}

.btn-form {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    height: 100%;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--cipc-blue);
}

.btn-form i {
    font-size: 2.5rem;
    color: var(--cipc-blue);
    margin-bottom: 1rem;
}

.form-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--cipc-blue), var(--cipc-gold));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1rem;
}

.section-title {
    border-left: 4px solid var(--cipc-gold);
    padding-left: 12px;
    margin: 1.5rem 0;
    color: var(--cipc-blue);
    font-weight: 600;
    font-size: 1.4rem;
}

.form-label {
    font-weight: 500;
    color: #495057;
}

.form-control,
.form-select {
    border: 1.5px solid #ced4da;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--cipc-blue);
    box-shadow: 0 0 0 0.25rem rgba(0, 51, 102, 0.15);
}

.pdf-preview {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 2rem;
    min-height: 800px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.letterhead {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--cipc-blue);
    margin-bottom: 2rem;
}

.letterhead h2 {
    color: var(--cipc-blue);
    margin: 0.5rem 0;
    font-weight: 700;
    font-size: 1.8rem;
}

.letterhead p {
    color: #6c757d;
    margin: 0.25rem 0;
    font-weight: 500;
}

.form-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    table-layout: fixed;
}

.form-table th {
    background-color: var(--cipc-blue);
    color: white;
    text-align: left;
    padding: 0.75rem;
    font-weight: 500;
    border: 1px solid #000;
    font-size: 0.9rem;
}

.form-table td {
    padding: 0.75rem;
    border: 1px solid #000;
    font-size: 0.85rem;
    min-height: 28px;
    word-wrap: break-word;
}

.form-table tr:hover td {
    background-color: rgba(0, 51, 102, 0.02);
}

.signature-section {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #dee2e6;
}

.mobile-warning {
    background-color: #fff8e6;
    border-left: 4px solid var(--cipc-gold);
    padding: 1rem;
    border-radius: 0 4px 4px 0;
    margin: 1rem 0;
}

.owner-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.owner-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.owner-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.form-template {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
}

.form-template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.template-title {
    font-weight: 600;
    color: var(--cipc-blue);
    font-size: 1.2rem;
}

.template-actions {
    display: flex;
    gap: 0.5rem;
}

.cipc-note {
    background-color: #e9f2fa;
    border-left: 4px solid var(--cipc-blue);
    padding: 1rem;
    border-radius: 0 4px 4px 0;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.signature-line {
    margin: 1.5rem 0;
}

.signature-placeholder {
    border-bottom: 1px solid #000;
    min-height: 20px;
    margin: 0.5rem 0 0;
    width: 300px;
}

.date-placeholder {
    border-bottom: 1px solid #000;
    min-height: 20px;
    margin: 0.5rem 0 0;
    width: 200px;
}

.cipc-table-note {
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Specific styling for Security Register table */
#pdfSecurityRegister .form-table th,
#pdfSecurityRegister .form-table td {
    padding: 0.4rem;
    font-size: 0.7rem;
}

@media (max-width: 768px) {
    .pdf-preview {
        padding: 1rem;
        min-height: auto;
    }

    .letterhead h1 {
        font-size: 1.5rem;
    }

    .form-table {
        display: block;
        overflow-x: auto;
    }

    .owner-actions,
    .template-actions {
        position: static;
        margin-top: 1rem;
    }
}