/* IC Card Japanese Identity Card Styles - aligned with Tokyo Vibe Login */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Noto+Sans+JP:wght@400;700&family=Caveat:wght@400;700&display=swap');

:root {
    --ic-bg-color: rgba(20, 20, 25, 0.9);
    --ic-accent-blue: #25a5e1;
    --ic-accent-gold: #ffcc33;
    --ic-text-primary: #ffffff;
    --ic-text-secondary: rgba(255, 255, 255, 0.5);
    --ic-border-radius: 24px;
}

.ic-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 300px;
    background: var(--ic-bg-color);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: var(--ic-border-radius);
    padding: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    color: var(--ic-text-primary);
    font-family: 'Inter', 'Noto Sans JP', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
}

.ic-card::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20px;
    right: 20px;
    height: 4px;
    background: linear-gradient(90deg, var(--ic-accent-blue), var(--ic-accent-gold));
    filter: blur(6px);
    opacity: 0.8;
    z-index: 15;
}

.ic-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8);
}

.card-top-left-strip {
    position: absolute;
    top: -1px;
    left: -1px;
    width: 40px;
    height: 40px;
    border-top: 3px solid var(--ic-accent-blue);
    border-left: 3px solid var(--ic-accent-blue);
    border-top-left-radius: 24px;
    pointer-events: none;
    z-index: 20;
    filter: blur(0.5px) drop-shadow(0 0 12px var(--ic-accent-blue)) drop-shadow(0 0 20px rgba(37, 165, 225, 0.4));
}

/* Holographic Sheen Overlay */
.ic-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        110deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0) 40%,
        rgba(37, 165, 225, 0.15) 50%,
        rgba(255,255,255,0) 60%,
        rgba(255,255,255,0) 100%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    z-index: 10;
}

.ic-card:hover::before {
    opacity: 1;
    animation: holo-slide 3s infinite linear;
}

@keyframes holo-slide {
    0% { transform: translate(-30%, -30%) rotate(0deg); }
    100% { transform: translate(30%, 30%) rotate(0deg); }
}

/* Header Section */
.ic-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.02);
    padding-bottom: 8px;
}

.ic-header .title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #555 !important;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.05), -1px -1px 0px rgba(0, 0, 0, 0.4);
}

.ic-header .serial {
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 800;
    color: var(--ic-text-secondary);
}

/* Biometric Portrait Area */
.ic-body {
    display: flex;
    gap: 30px;
}

.ic-portrait-section {
    position: relative;
    width: 110px;
    height: 140px;
}

.ic-portrait-container {
    position: relative;
    width: 110px;
    height: 140px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.ic-avatar-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    object-position: top center;
    transform: scale(1.4) translateY(12px);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    z-index: 2;
}

.ic-level-badge {
    position: absolute;
    bottom: -15px;
    right: -15px;
    width: 32px; /* Slightly smaller for better fit */
    height: 32px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-family: 'Inter', sans-serif;
    z-index: 100; /* Ensure it stays on top */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.ic-level-badge span {
    font-size: 7px;
    font-weight: 800;
    text-transform: uppercase;
    opacity: 0.6;
    letter-spacing: 0.5px;
    line-height: 1;
}

.ic-level-badge .lvl-num {
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    margin-top: 1px;
}

.ic-biometric-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(85, 85, 85, 0.4) 1px, transparent 1px);
    background-size: 10px 10px;
    z-index: 1;
}

.ic-scanning-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--ic-accent-blue);
    box-shadow: 0 0 15px var(--ic-accent-blue);
    z-index: 3;
    animation: scan-move 4s 1 ease-in-out forwards; /* Stops at 100% */
}

.ic-card:hover .ic-scanning-line {
    animation: scan-move 4s infinite alternate ease-in-out; /* Smooth loop on hover */
}

@keyframes scan-move {
    0% { top: 0; }
    100% { top: 100%; }
}

/* Data Section */
.ic-info-grid {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ic-field {
    display: flex;
    flex-direction: column;
}

.ic-label {
    font-size: 9px;
    text-transform: uppercase;
    color: var(--ic-text-secondary);
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.ic-value {
    font-size: 14px;
    font-weight: 600;
    color: #ccc;
    text-transform: none; /* No transform for sentence case */
}

.ic-value.status-online {
    color: #2ecc71 !important;
}

.ic-value.status-offline {
    color: #e74c3c !important;
}

.ic-value.japanese {
    font-family: 'Noto Sans JP', sans-serif;
    font-size: 16px;
    letter-spacing: 1px;
}

/* IC Chip and Barcode Section */
.ic-footer {
    position: absolute;
    bottom: 25px;
    right: 25px;
    left: 25px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.ic-chip {
    width: 45px;
    height: 35px;
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    border-radius: 6px;
    position: relative;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: inset 1px 1px 1px rgba(255,255,255,0.4), 0 0 15px rgba(241, 196, 15, 0.2);
}

.ic-chip::after {
    content: '';
    position: absolute;
    top: 0; left:0; width: 100%; height:100%;
    background: 
        linear-gradient(90deg, transparent 48%, rgba(0,0,0,0.1) 48%, rgba(0,0,0,0.1) 52%, transparent 52%),
        linear-gradient(0deg, transparent 48%, rgba(0,0,0,0.1) 48%, rgba(0,0,0,0.1) 52%, transparent 52%);
    border-radius: 6px;
}

.ic-barcode {
    width: 120px;
    height: 20px;
    background: repeating-linear-gradient(
        to right,
        #fff,
        #fff 1px,
        transparent 1px,
        transparent 3px,
        #fff 3px,
        #fff 4px,
        transparent 4px,
        transparent 6px
    );
    opacity: 0.2;
}

.ic-district-stamp {
    position: absolute;
    top: 60px;
    right: 40px;
    width: 60px;
    height: 60px;
    border: 1px dashed rgba(37, 165, 225, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: rgba(37, 165, 225, 0.2);
    font-size: 9px;
    font-weight: 800;
    transform: rotate(-15deg);
    text-align: center;
}
/* Employment Ledger Section - Corporate Aesthetic */
.employment-ledger {
    position: relative;
    width: 100%;
    background: var(--ic-bg-color);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: var(--ic-border-radius);
    padding: 30px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--ic-text-primary);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    margin-top: 25px;
}

.employment-ledger::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 20px;
    right: 20px;
    height: 4px;
    background: linear-gradient(90deg, var(--ic-accent-blue), var(--ic-accent-gold));
    filter: blur(6px);
    opacity: 0.8;
    z-index: 15;
}

.ledger-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0.02);
    padding-bottom: 15px;
    margin-bottom: 25px;
    position: relative;
    z-index: 5;
}

.ledger-title-group .main-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #555 !important;
    text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.05), -1px -1px 0px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    margin: 0;
}

.ledger-title-group .sub-title {
    font-size: 10px;
    color: var(--ic-text-secondary);
    letter-spacing: 1px;
    margin-top: 4px;
}

.ledger-auth-id {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: var(--ic-accent-gold);
    background: rgba(255, 204, 51, 0.05);
    padding: 4px 12px;
    border: 1px solid rgba(255, 204, 51, 0.2);
    border-radius: 4px;
    letter-spacing: 1px;
    position: relative;
    z-index: 5;
}

.ledger-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    position: relative;
    z-index: 5;
}

.ledger-section-title {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 20px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ledger-column-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    padding: 20px;
    height: 100%;
    transition: background 0.3s ease;
}

.ledger-column-card:hover {
    background: rgba(255, 255, 255, 0.03);
}

.ledger-column-card .ledger-metric:last-child {
    margin-bottom: 0;
}

.ledger-metric {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.ledger-label {
    font-size: 9px;
    color: var(--ic-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.ledger-value {
    font-size: 14px;
    font-weight: 600;
    color: #ccc;
}

.ledger-value.highlight {
    color: var(--ic-accent-gold);
}

.ledger-value.highlight-blue {
    color: var(--ic-accent-blue);
}

.ledger-value.highlight-green {
    color: #2ecc71;
}

.ledger-badge {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    background: #000; /* Black background */
    color: rgba(255, 255, 255, 0.2); /* Dark grey text */
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05); /* Very subtle border */
    margin-left: 8px;
    letter-spacing: 0.5px;
    vertical-align: middle;
    text-shadow: 0.5px 0.5px 0px rgba(255, 255, 255, 0.05), -0.5px -0.5px 0px rgba(0, 0, 0, 0.8); /* Embossed effect */
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

.ledger-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 5;
}

.ledger-signature {
    display: flex;
    flex-direction: column;
    gap: 2px;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
    opacity: 0.8;
}

.signature-label {
    font-size: 8px;
    color: var(--ic-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.signature-ink {
    font-family: 'Caveat', cursive;
    font-size: 24px;
    color: rgba(255, 255, 255, 0.4);
    transform: rotate(-3deg);
    margin-left: 10px;
    margin-top: -5px;
    letter-spacing: 1px;
}

.btn-resign {
    border: none;
    border-radius: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-resign:hover {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.4);
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.2);
    transform: translateY(-2px);
}

.btn-resign img {
    height: 18px;
    width: auto;
    image-rendering: auto; /* Since it's a gif, pixelated might be too sharp */
}

@media (max-width: 991px) {
    .ledger-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
