/* =========================================
   DOCUMENTS & POLICIES STYLES (User & Admin)
   ========================================= */

/* --- User Side: Document Grid --- */
#documents {
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.doc-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    border-left: 5px solid #002244; /* Navy Accent */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-left-color: #FFD700; /* Gold on hover */
}

.doc-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #002244;
    margin-bottom: 5px;
    line-height: 1.4;
    text-decoration: none;
}

.doc-date {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 20px;
}

.btn-download {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f0f8ff;
    color: #002244;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    border: 1px solid #cce5ff;
    text-align: center;
    transition: 0.2s;
}

.btn-download:hover {
    background-color: #002244;
    color: #FFD700;
    border-color: #002244;
}

/* --- Disclaimer Box --- */
.disclaimer-box {
    margin-top: 50px;
    padding: 20px;
    background-color: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    color: #856404;
    align-items: flex-start;
}

.disclaimer-box i { font-size: 1.5rem; margin-top: 3px; }

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .doc-grid { grid-template-columns: 1fr; }
    .disclaimer-box { flex-direction: column; text-align: center; align-items: center; }
}


/* =========================================
   ADMIN DASHBOARD FIXES
   ========================================= */

/* 1. Styled File Input (The "Choose File" Button) */
.custom-file-input {
    width: 100%;
    padding: 15px;
    background: #f8f9fa;
    border: 2px dashed #002244; /* Dotted navy border */
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    color: #555;
    transition: 0.3s;
}

.custom-file-input:hover {
    background: #eef2f5;
    border-color: #FFD700; /* Gold on hover */
}

/* Style the actual internal button of the file input */
.custom-file-input::file-selector-button {
    background-color: #002244;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    margin-right: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.custom-file-input::file-selector-button:hover {
    background-color: #FFD700;
    color: #002244;
}

/* 2. Fix the Refresh Button Cut-off */
.panel .panel-header {
    display: flex;
    justify-content: space-between; /* Push title left, button right */
    align-items: center;
    flex-wrap: wrap;       
    gap: 15px;             
    padding-right: 30px !important; /* Extra padding on the right to prevent cut-off */
    width: 100%;
    box-sizing: border-box; 
}

/* Specific fix for the button inside the header */
.panel-header button, 
.panel-header .btn-sm {
    flex-shrink: 0;       /* Prevent squashing */
    white-space: nowrap;  /* Keep text on one line */
    margin-right: 10px;   /* Move away from the edge */
    min-width: 100px;     /* Ensure it has width */
}

/* 3. Table Container Fix */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
}